Sha256: beb3c6448c27fbddded7fcb4278defae8cd0f90189c4deb6c9dbe375969092f3

Contents?: true

Size: 1.62 KB

Versions: 43

Compression:

Stored size: 1.62 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 output should contain one of the following:$/ do |table|
  matching_output = table.raw.flatten.select do |string|
    all_output =~ regexp(string)
  end

  matching_output.should have(1).item
end

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

Then /^the process should succeed even though no examples were run$/ do
  step %q{the output should contain "0 examples, 0 failures"}
  step %q{the exit status should be 0}
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

# This step can be generalized if it's ever used to test other colors
Then /^the failing example is printed in magenta$/ do
  # \e[35m = enable magenta
  # \e[0m  = reset colors
  expect(all_output).to include("\e[35m" + "F" + "\e[0m")
end

Version data entries

43 entries across 43 versions & 10 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/step_definitions/additional_cli_steps.rb
rspec-core-2.99.2 features/step_definitions/additional_cli_steps.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb
rspec-core-2.99.1 features/step_definitions/additional_cli_steps.rb
rspec-core-2.99.0 features/step_definitions/additional_cli_steps.rb
rspec-core-2.99.0.rc1 features/step_definitions/additional_cli_steps.rb
rspec-core-2.14.8 features/step_definitions/additional_cli_steps.rb
rspec-core-2.99.0.beta2 features/step_definitions/additional_cli_steps.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb
tuktuk-rails-0.0.10 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb