Skip to content

Commit

Permalink
Merge pull request #31 from dnagir/master
Browse files Browse the repository at this point in the history
Respect binstubs option
  • Loading branch information
netzpirat committed Jan 17, 2012
2 parents 330c90a + 33934e8 commit 8c6429a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/guard/cucumber/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,21 @@ def run(paths, options = { })
# @param [Array<String>] paths the feature files or directories
# @param [Hash] options the options for the execution
# @option options [Boolean] :bundler use bundler or not
# @option options [Boolean] :binstubs use the binstubs generated by bundler or a custom command
# @option options [Array<String>] :rvm a list of rvm version to use for the test
# @option options [Boolean] :notification show notifications
# @return [String] the Cucumber command
#
def cucumber_command(paths, options)
cmd = []
cmd << "rvm #{options[:rvm].join(',')} exec" if options[:rvm].is_a?(Array)
cmd << 'bundle exec' if bundler? && options[:bundler] != false
if binstubs = options[:binstubs]
cmd << (binstubs === true ? 'bin/cucumber' : binstubs.to_s)
else
cmd << 'bundle exec' if bundler? && options[:bundler] != false
cmd << 'cucumber'
end

cmd << 'cucumber'
cmd << options[:cli] if options[:cli]

if options[:notification] != false
Expand Down

0 comments on commit 8c6429a

Please sign in to comment.