Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require Bundler to use binstubs #8

Merged
merged 2 commits into from
Apr 1, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/guard/cucumber/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def cucumber_command(paths, options)
cmd = []
cmd << options[:command_prefix] if options[:command_prefix]
cmd << "rvm #{ options[:rvm].join(',') } exec" if options[:rvm].is_a?(Array)
cmd << 'bundle exec' if (bundler? && options[:bundler] != false) || (bundler? && options[:binstubs].is_a?(TrueClass))
cmd << 'bundle exec' if bundler? && options[:bundler] != false
cmd << cucumber_exec(options)
cmd << options[:cli] if options[:cli]

Expand All @@ -64,7 +64,7 @@ def cucumber_command(paths, options)
# @return [String] Cucumber executable
#
def cucumber_exec(options = {})
options[:binstubs] == true && ( bundler? || options[:bundler] != false ) ? 'bin/cucumber' : 'cucumber'
options[:binstubs] == true ? 'bin/cucumber' : 'cucumber'
end

# Simple test if bundler should be used. it just checks for the `Gemfile`.
Expand Down
2 changes: 1 addition & 1 deletion spec/guard/cucumber/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
describe ':binstubs' do
it 'runs without Bundler with binstubs option to true and bundler option to false' do
subject.should_receive(:system).with(
"bundle exec bin/cucumber --require #{ @lib_path.join('guard/cucumber/notification_formatter.rb') } --format Guard::Cucumber::NotificationFormatter --out #{ null_device } --require features features"
"bin/cucumber --require #{ @lib_path.join('guard/cucumber/notification_formatter.rb') } --format Guard::Cucumber::NotificationFormatter --out #{ null_device } --require features features"
).and_return(true)
subject.run(['features'], :bundler => false, :binstubs => true)
end
Expand Down