Sha256: 46819a76e6edc3b916ca55517bebd538668fd355f9258654c0e32c9eac6bfc3c

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

require 'rspec/core'  # to fix annoying "undefined method `configuration' for RSpec:Module (NoMethodError)"

Then /^the output should contain all of these:$/ do |table|
  table.raw.flatten.each do |string|
    assert_partial_output(string, all_output)
  end
end

Then /^the output should not contain any of these:$/ do |table|
  table.raw.flatten.each do |string|
    all_output.should_not =~ regexp(string)
  end
end

Then /^the example(?:s)? should(?: all)? pass$/ do
  step %q{the output should contain "0 failures"}
  step %q{the exit status should be 0}
end

Then /^the file "([^"]*)" should contain:$/ do |file, partial_content|
  check_file_content(file, partial_content, true)
end

Then /^the backtrace\-normalized output should contain:$/ do |partial_output|
  # ruby 1.9 includes additional stuff in the backtrace,
  # so we need to normalize it to compare it with our expected output.
  normalized_output = all_output.split("\n").map do |line|
    line =~ /(^\s+# [^:]+:\d+)/ ? $1 : line # http://rubular.com/r/zDD7DdWyzF
  end.join("\n")

  normalized_output.should =~ regexp(partial_output)
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
remq-0.0.4 vendor/bundle/gems/rspec-core-2.12.2/features/step_definitions/additional_cli_steps.rb
remq-0.0.3 vendor/bundle/gems/rspec-core-2.12.2/features/step_definitions/additional_cli_steps.rb
rspec-core-2.12.2 features/step_definitions/additional_cli_steps.rb
rspec-core-2.12.1 features/step_definitions/additional_cli_steps.rb
rspec-core-2.12.0 features/step_definitions/additional_cli_steps.rb