features/steps/cli_steps.rb in flapjack-0.9.6 vs features/steps/cli_steps.rb in flapjack-1.0.0rc1

- old
+ new

@@ -9,15 +9,15 @@ Given /^a fifo named "([^"]*)" exists$/ do |fifo_name| create_fifo(fifo_name) end -When /^I ((?:re)?start|stop) (\S+)( \(daemonised\))? with `(.+)`$/ do |start_stop_restart, exe, daemonise, cmd| +When /^I ((?:re)?start|stop) (\S+)( \(daemonised\))?( \(via bundle exec\))? with `(.+)`$/ do |start_stop_restart, exe, daemonise, bundle_exec, cmd| @daemons_output ||= [] @daemons_exit_status ||= [] @root = Pathname.new(File.dirname(__FILE__)).parent.parent.expand_path - command = "#{@root.join('bin')}/#{cmd}" + command = "#{bundle_exec ? 'bundle exec ' : ''}#{@root.join('bin')}/#{cmd}" # enable debugging output from spawn_process etc #@debug = true case start_stop_restart