I've done a 7kyu kata. The task was to return the same table, but with one column changed.
Say they want to to upper one column, but other columns should remain the same.
In that kata there were only 4 columns.
And all top soulutions was like this:
SELECT column1, column2, column3, UPPER(column4)
But i came with an idea and soulution for the case when there are say 10 columns.
Instead of making a big selecet statement we can do like this:
SELECT *, UPPER(column5) as column5
FROM test_table
results = run_sql.select(:column5)
describe :test_table do
it "column5 should be uppercase" do
expect(results[:column5][:column5]).to eq "TEXT5"
end
end