class MigrationValidators::Spec::Matchers::DBMatchers::Deny
Public Instance Methods
check_result(value, exception, operation)
click to toggle source
Calls superclass method
MigrationValidators::Spec::Matchers::DBMatchers::BaseDbMatcher#check_result
# File lib/migration_validators/spec/matchers/db_matchers.rb, line 153 def check_result value, exception, operation super && exception && exception.message =~ /#{message}/ end
description()
click to toggle source
# File lib/migration_validators/spec/matchers/db_matchers.rb, line 157 def description compose_message do |operations_name, elements_name, last_message, expected_message| "expected that operation #{operations_name} would fail for #{elements_name} from #{values} #{expected_message}" end end
failure_message()
click to toggle source
# File lib/migration_validators/spec/matchers/db_matchers.rb, line 164 def failure_message compose_message do |operations_name, elements_name, last_message, expected_message| "expected that operation #{operations_name} would fail for #{elements_name} from #{values} #{expected_message}. But #{last_operation} #{last_message.blank? ? 'successed with ' : 'raised ' + last_message + ' for '}'#{last_value}'" end end
failure_message_when_negated()
click to toggle source
# File lib/migration_validators/spec/matchers/db_matchers.rb, line 170 def failure_message_when_negated compose_message do |operations_name, elements_name, last_message, expected_message| "not expected that operation #{operations_name} would fail for #{elements_name} from #{values} #{expected_message}. But it happened with #{last_operation} on '#{last_value}'" end end