Sha256: dc9504797b1736b47a4b67e10bf2f93df671feccae30e34b2c7216ec1c488d1a
Contents?: true
Size: 992 Bytes
Versions: 7
Compression:
Stored size: 992 Bytes
Contents
When /^I build the gem$/ do project_root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path rakefile = project_root.join('Rakefile') File.exist?(rakefile).should be_true silent_system("rake -f #{rakefile} build").should be_true end When /^I install the latest gem$/ do project_root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path pkg_dir = project_root.join('pkg') glob = File.join(pkg_dir, '*.gem') latest = Dir.glob(glob).sort {|a, b| File.ctime(a) <=> File.ctime(b) }.last silent_system("gem install #{latest} 2>&1 > /dev/null").should be_true end Then /^I should have cucumber\-nagios\-gen on my path$/ do silent_system("which cucumber-nagios-gen").should be_true end Then /^I can generate a new project$/ do testproj = "testproj-#{Time.now.to_i}" FileUtils.rm_rf("/tmp/#{testproj}") silent_system("cd /tmp ; cucumber-nagios-gen project #{testproj}").should be_true File.exists?("/tmp/#{testproj}").should be_true end
Version data entries
7 entries across 7 versions & 1 rubygems