Sha256: 44bf40daf5d0788e45d24f07196fd6207682752d037c3781f15829cfb26bb4c1
Contents?: true
Size: 1.76 KB
Versions: 1
Compression:
Stored size: 1.76 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| silent_system("cd /tmp/#{@project_name} ; cucumber-nagios-gen feature #{site} #{feature}") 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| silent_system("cd /tmp/#{@project_name} ; bin/cucumber-nagios features/#{site}/#{feature}.feature").should be_true end Then /^the "([^\"]*)" feature on "([^\"]*)" should not exit cleanly$/ do |feature, site| silent_system("cd /tmp/#{@project_name} ; bin/cucumber-nagios features/#{site}/#{feature}.feature").should be_false 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| command = "cd /tmp/#{@project_name} ; bin/cucumber-nagios features/#{site}/#{feature}.feature" @output = `#{command}` @output.split("\n").size.should > 1 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber-nagios-0.8.10 | features/steps/using_steps.rb |