We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ace9456 commit b706292Copy full SHA for b706292
lib/squcumber-postgres/step_definitions/common_steps.rb
@@ -101,6 +101,13 @@
101
@result = TESTING_DATABASE.query("select * from #{table} #{sort_statement};").map { |e| e }
102
end
103
104
+When(/^the result is ordered by "?([^"]+)"?/) do |sort_columns_string|
105
+ sort_columns = sort_columns_string.split(',').map { |sort_column| sort_column.strip }
106
+ @result = @result.sort_by do |row|
107
+ sort_columns.map { |sort_column| row[sort_column] }
108
+ end
109
+end
110
+
111
Then(/^the result( with date placeholders)? starts with.*$/) do |placeholder, data|
112
actual = @result[0..(data.hashes.length - 1)] || []
113
expected = data.hashes || []
0 commit comments