Sha256: 93bd2c13a2f27d764a87265e54b5c2aa512678b16b669e5c6b4222efcbce3d28
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
Given /^the "([^"]*)" gem is installed$/ do |name| `gem list #{name} |grep #{name}`.size.should > 0 end When /^I start the visage server helper with "([^"]*)"$/ do |cmd| @root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path command = "#{@root.join('bin')}/#{cmd}" @pipe = IO.popen(command, "r") sleep 2 # so the visage server has a chance to boot # clean up the visage server when the tests finish at_exit do Process.kill("KILL", @pipe.pid) end end Then /^a visage web server should be running$/ do `ps -eo cmd |grep ^visage`.size.should > 0 end Then /^I should see "([^"]*)" on the terminal$/ do |string| output = @pipe.read(350) output.should =~ /#{string}/ end Given /^there is no file at "([^"]*)"$/ do |filename| FileUtils.rm_f(filename).should be_true end When /^I start the visage server helper with "([^"]*)" and the following variables:$/ do |cmd, table| table.hashes.each do |hash| hash.each_pair do |variable, value| ENV[variable] = value end end step %(I start the visage server helper with "#{cmd}") end Then /^I should see a file at "([^"]*)"$/ do |filename| File.exists?(filename).should be_true end Then /^show me the output$/ do puts @pipe.read(350) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
visage-app-2.1.0 | features/step_definitions/cli_steps.rb |