Sha256: a3a52bb2a6ca3c4d346f9d7ca1170839f00fbc732a5f4901b517dfa5e6a817e2

Contents?: true

Size: 391 Bytes

Versions: 6

Compression:

Stored size: 391 Bytes

Contents

RSpec::Matchers.define :have_no_errors do
  match do |test_runner|
    test_runner.raised_error.nil?
  end

  failure_message do |test_runner|
    err = test_runner.raised_error
    filtered = (err.backtrace || []).reject do |line|
      Cucumber::Ast::StepInvocation::BACKTRACE_FILTER_PATTERNS.find { |p| line =~ p }
    end
    (["#{err.class}: #{err}"] + filtered).join("\n  ")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
message-driver-0.6.1 features/support/no_error_matcher.rb
message-driver-0.6.0 features/support/no_error_matcher.rb
message-driver-0.5.3 features/support/no_error_matcher.rb
message-driver-0.5.2 features/support/no_error_matcher.rb
message-driver-0.5.1 features/support/no_error_matcher.rb
message-driver-0.5.0 features/support/no_error_matcher.rb