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

Obey program suffix when invoking bundler #324

Merged
merged 1 commit into from
Feb 26, 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
3 changes: 2 additions & 1 deletion lib/cucumber/rake/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def gem_available_new_rubygems?(gemname)

def cmd
if use_bundler
[ Cucumber::RUBY_BINARY, '-S', 'bundle', 'exec', 'cucumber', @cucumber_opts,
bundle_cmd = Gem.default_exec_format % 'bundle'
[ Cucumber::RUBY_BINARY, '-S', bundle_cmd, 'exec', 'cucumber', @cucumber_opts,
@feature_files ].flatten
else
[ Cucumber::RUBY_BINARY, '-I', load_path(@libs), quoted_binary(@cucumber_bin),
Expand Down
17 changes: 15 additions & 2 deletions spec/cucumber/rake/forked_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,22 @@ module Rake
end

it "uses bundle exec to find cucumber and libraries" do
bundle_cmd = Gem.default_exec_format % 'bundle'

subject.cmd.should == [Cucumber::RUBY_BINARY,
'-S',
bundle_cmd,
'exec',
'cucumber',
'--cuke-option'] + feature_files
end

it "obeys program suffix for bundler" do
Gem::ConfigMap.stub(:[]).with(:ruby_install_name).and_return('XrubyY')

subject.cmd.should == [Cucumber::RUBY_BINARY,
'-S',
'bundle',
'XbundleY',
'exec',
'cucumber',
'--cuke-option'] + feature_files
Expand Down Expand Up @@ -59,4 +72,4 @@ module Rake
end

end
end
end