Sha256: e274e4d7907477a8c02f4b185cc8550a1cc0d86f09ce4ffabe48b4eea82cc3f5

Contents?: true

Size: 1.31 KB

Versions: 17

Compression:

Stored size: 1.31 KB

Contents

When /^I run rspec( with the documentation option)?$/ do |documentation|
  rspec_its_gem_location = File.expand_path('../../../lib/rspec/its', __FILE__)
  require_option = "--require #{rspec_its_gem_location}"
  format_option = documentation ? "--format documentation" : ""
  rspec_command = ['rspec', require_option, format_option, 'example_spec.rb'].join(' ')
  step "I run `#{rspec_command}`"
end

When /^I run rspec specifying line number (\d+)$/ do |line_number|
  rspec_its_gem_location = File.expand_path('../../../lib/rspec/its', __FILE__)
  require_option = "--require #{rspec_its_gem_location}"
  file_specification = "example_spec.rb:#{line_number}"
  rspec_command = ['rspec', require_option, file_specification].join(' ')
  step "I run `#{rspec_command}`"
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 example should fail$/) do
  step %q{the output should contain "1 failure"}
  step %q{the exit status should not be 0}
end

Then(/^the output should contain "(.*?)" and "(.*?)"$/) do |string1, string2|
  unless [string1, string2].all? { |s| all_output.include?(s) }
    fail %Q{Both "#{string1}" and "#{string2}" were found in:\n#{all_output}}
  end
end

Version data entries

17 entries across 16 versions & 5 rubygems

Version Path
rspec-its-1.3.1 features/step_definitions/additional_cli_steps.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/rspec-its-1.3.0/features/step_definitions/additional_cli_steps.rb
rspec-its-1.3.0 features/step_definitions/additional_cli_steps.rb