spec/support/logging.rb in crypt_keeper-1.1.0 vs spec/support/logging.rb in crypt_keeper-1.1.1
- old
+ new
@@ -45,14 +45,11 @@
#
# Returns nothing.
def should_log_scrubbed_query(input:, output:)
queries = sql(input)
- valid_input = queries.none? { |line| line.include? input }
- expect(valid_input).to eq(true), "found unscrubbed SQL query logged!"
-
- valid_output = queries.any? { |line| line.include? output }
- expect(valid_output).to eq(true), "output query was not logged!"
+ expect(queries.join("\n")).to_not include(input)
+ expect(queries.join("\n")).to include(output)
end
# Public: Verifies that the given input query was not logged.
#
# input - SQL query