Sha256: 9a88751d97fe007d5e291257aebeedf8250131ae9190bf83bb1e53d2651a7468
Contents?: true
Size: 1.83 KB
Versions: 2
Compression:
Stored size: 1.83 KB
Contents
Given /^a project called "([^\"]*)" is created and frozen$/ do |project_name| @project_name = project_name Given 'cucumber-nagios is installed' When "I create a new project called \"#{@project_name}\"" And 'I freeze in dependencies' Then 'a Gemfile lock should be created' end When /^I generate a new feature called "([^\"]*)" for "([^\"]*)"$/ do |feature, site| Dir.chdir("/tmp/#{@project_name}") do silent_system("cucumber-nagios-gen feature #{site} #{feature}") end end Then /^a feature file should exist for "([^\"]*)" on "([^\"]*)"$/ do |feature, site| File.exists?("/tmp/#{@project_name}/features/#{site}/#{feature}.feature").should be_true end Then /^the "([^\"]*)" feature on "([^\"]*)" should exit cleanly$/ do |feature, site| Dir.chdir("/tmp/#{@project_name}") do silent_system("cucumber-nagios features/#{site}/#{feature}.feature").should be_true end end Then /^the "([^\"]*)" feature on "([^\"]*)" should not exit cleanly$/ do |feature, site| Dir.chdir("/tmp/#{@project_name}") do silent_system("cucumber-nagios features/#{site}/#{feature}.feature").should be_false end end When /^the "([^\"]*)" feature on "([^\"]*)" checks for something preposterous$/ do |feature, site| file_name = "/tmp/#{@project_name}/features/#{site}/#{feature}.feature" File.open(file_name,'a') do |file| file << " Then I should see \"supercalifragilisticexpialidocious\"" end end Then /^"([^"]*)" in the "([^"]*)" project should not exist$/ do |file, project_name| filename = File.join(file, project_name) File.exists?(filename).should be_false end Then /^the "([^"]*)" feature on "([^"]*)" should produce multiline output$/ do |feature, site| Dir.chdir("/tmp/#{@project_name}") do command = "cucumber-nagios features/#{site}/#{feature}.feature" @output = `#{command}` @output.split("\n").size.should > 1 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber-nagios-0.9.2 | features/steps/using_steps.rb |
cucumber-nagios-0.9.0 | features/steps/using_steps.rb |