features/steps/packaging-lintian_steps.rb in flapjack-0.7.35 vs features/steps/packaging-lintian_steps.rb in flapjack-0.8.0

- old
+ new

@@ -1,16 +1,16 @@ Given /^I am at the project root$/ do - Dir.pwd.split('/').last.should == "flapjack" + expect(Dir.pwd.split('/').last).to eq("flapjack") end Then /^I should see (\d+) lines of output$/ do |number| - @output.split.size.should == number.to_i + expect(@output.split.size).to eq(number.to_i) end Then /^every file in the output should start with "([^\"]*)"$/ do |string| @output.split.each do |file| - `head -n 1 #{file}`.should =~ /^#{string}\s*$/ + expect(`head -n 1 #{file}`).to match(/^#{string}\s*$/) end end When /^I run `([^"]*)`$/ do |cmd| @cmd = cmd @@ -19,15 +19,11 @@ puts "output: #{@output}" if @debug puts "exit_status: #{@exit_status}" if @debug end Then /^the exit status should( not)? be (\d+)$/ do |negativity, number| - if negativity - @exit_status.should_not == number.to_i - else - @exit_status.should == number.to_i - end + expect(@exit_status).send(negativity ? :not_to : :to, eq(number.to_i)) end Then /^the output should contain "([^"]*)"$/ do |matcher| - @output.should include(matcher) + expect(@output).to include(matcher) end