Sha256: 245c71c429881f513ae85b83faeba0175f30f8f97aa7ad3a8e4a74383a58e022

Contents?: true

Size: 1011 Bytes

Versions: 1

Compression:

Stored size: 1011 Bytes

Contents

When(/^I run rubycritic (.*)$/) do |args|
  rubycritic(args)
end

Then(/^the exit status indicates an error$/) do
  expect(last_command_started).to have_exit_status(RubyCritic::Command::StatusReporter::SCORE_BELOW_MINIMUM)
end

Then(/^the exit status indicates a success$/) do
  expect(last_command_started).to have_exit_status(RubyCritic::Command::StatusReporter::SUCCESS)
end

Then(/^it reports:$/) do |report|
  expect(last_command_started).to have_output_on_stdout(report.gsub('\n', "\n"))
end

Then(/^there is no output on stdout$/) do
  expect(last_command_started).to have_output_on_stdout('')
end

Then(/^it reports the current version$/) do
  expect(last_command_started).to have_output("RubyCritic #{RubyCritic::VERSION}\n")
end

Then(/^it reports the error ['"](.*)['"]$/) do |string|
  expect(last_command_started).to have_output_on_stderr(/#{Regexp.escape(string)}/)
end

Then(/^it succeeds$/) do
  expect(last_command_started).to have_exit_status(RubyCritic::Command::StatusReporter::SUCCESS)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubycritic-2.9.3 features/step_definitions/rubycritic_steps.rb