Sha256: be4d02dacb4b8185cac5269f142c95b54dea366ded07c54c361c9aeb521f881a

Contents?: true

Size: 875 Bytes

Versions: 36

Compression:

Stored size: 875 Bytes

Contents

Given /^I am at the project root$/ do
  expect(Dir.pwd.split('/').last).to eq("flapjack")
end

Then /^I should see (\d+) lines of output$/ do |number|
  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|
    expect(`head -n 1 #{file}`).to match(/^#{string}\s*$/)
  end
end

When /^I run `([^"]*)`$/ do |cmd|
  @cmd = cmd
  @output = `#{cmd} 2>&1`
  @exit_status = $?.exitstatus
  puts "output: #{@output}" if @debug
  puts "exit_status: #{@exit_status}" if @debug
end

Then /^the exit status should( not)? be (\d+)$/ do |negativity, number|
  expect(@exit_status).send(negativity ? :not_to : :to, eq(number.to_i))
end

Then /^the output should( not)? contain "([^"]*)"$/ do |negativity, matcher|
  expect(@output).send(negativity ? :not_to : :to, include(matcher))
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
flapjack-1.6.0 features/steps/packaging-lintian_steps.rb
flapjack-1.6.0rc4 features/steps/packaging-lintian_steps.rb
flapjack-1.6.0rc3 features/steps/packaging-lintian_steps.rb
flapjack-1.6.0rc2 features/steps/packaging-lintian_steps.rb
flapjack-1.6.0rc1 features/steps/packaging-lintian_steps.rb
flapjack-1.5.0 features/steps/packaging-lintian_steps.rb
flapjack-1.5.0rc1 features/steps/packaging-lintian_steps.rb
flapjack-1.4.0 features/steps/packaging-lintian_steps.rb
flapjack-1.4.0rc1 features/steps/packaging-lintian_steps.rb
flapjack-1.3.0 features/steps/packaging-lintian_steps.rb
flapjack-1.3.0rc3 features/steps/packaging-lintian_steps.rb
flapjack-1.3.0rc2 features/steps/packaging-lintian_steps.rb
flapjack-1.3.0rc1 features/steps/packaging-lintian_steps.rb
flapjack-1.2.2 features/steps/packaging-lintian_steps.rb
flapjack-1.2.1 features/steps/packaging-lintian_steps.rb
flapjack-1.2.1rc3 features/steps/packaging-lintian_steps.rb
flapjack-1.2.1rc2 features/steps/packaging-lintian_steps.rb
flapjack-1.2.1rc1 features/steps/packaging-lintian_steps.rb
flapjack-1.2.0 features/steps/packaging-lintian_steps.rb
flapjack-0.9.6 features/steps/packaging-lintian_steps.rb