features/support/no_error_matcher.rb in message-driver-0.3.0 vs features/support/no_error_matcher.rb in message-driver-0.4.0
- old
+ new
@@ -1,13 +1,13 @@
RSpec::Matchers.define :have_no_errors do
match do |test_runner|
- test_runner.raised_error == nil
+ test_runner.raised_error.nil?
end
failure_message_for_should do |test_runner|
err = test_runner.raised_error
filtered = (err.backtrace || []).reject do |line|
- Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS.detect { |p| line =~ p }
+ Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS.find { |p| line =~ p }
end
- (["#{err.class}: #{err.to_s}"]+filtered).join("\n ")
+ (["#{err.class}: #{err}"]+filtered).join("\n ")
end
end