Sha256: 99f186542ebd156b41d003c62225ba264e474b2551107c72aa56387ae1977f39

Contents?: true

Size: 913 Bytes

Versions: 5

Compression:

Stored size: 913 Bytes

Contents

# Useful for when the output is slightly different on different versions of ruby
Then /^the output should contain "([^"]*)" or "([^"]*)"$/ do |string1, string2|
  unless [string1, string2].any? { |s| all_output.include?(s) }
    fail %(Neither "#{string1}" or "#{string2}" were found in:\n#{all_output})
  end
end

Then /^the output should contain all of these:$/ do |table|
  table.raw.flatten.each do |string|
    if RUBY_VERSION == '1.8.7' && string =~ /\{.+=>.+\}/
      warn "Skipping checking #{string} on 1.8.7 because hash ordering is not consistent"
    else
      expect(all_output).to include_output_string string
    end
  end
end

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

Then /^the example should fail$/ do
  step 'the output should contain "1 failure"'
  step 'the exit status should not be 0'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 rspec-expectations/upstream/features/step_definitions/additional_cli_steps.rb
opal-rspec-1.1.0.alpha2 rspec-expectations/upstream/features/step_definitions/additional_cli_steps.rb
opal-rspec-1.1.0.alpha1 rspec-expectations/upstream/features/step_definitions/additional_cli_steps.rb
opal-rspec-1.0.0 rspec-expectations/upstream/features/step_definitions/additional_cli_steps.rb
opal-rspec-1.0.0.alpha1 rspec-expectations/upstream/features/step_definitions/additional_cli_steps.rb