Skip to content

Commit

Permalink
fixed rake features by making sure tmp/rails_app's rake always runs w…
Browse files Browse the repository at this point in the history
…ith local Gemfile (not nifty's one)
  • Loading branch information
kpolitowicz committed Sep 7, 2011
1 parent 2bf4fb4 commit 3bcd95c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions features/step_definitions/common_steps.rb
@@ -1,5 +1,6 @@
When /^I run "([^\"]*)"$/ do |command|
system("cd #{@current_directory} && #{command}").should be_true
env_vars = command =~ /^rake/ ? "BUNDLE_GEMFILE=#{@current_directory}/Gemfile" : ''
system("cd #{@current_directory} && #{env_vars} #{command}").should be_true
end

When /^I add "([^\"]*)" to file "([^\"]*)"$/ do |content, short_path|
Expand Down Expand Up @@ -54,7 +55,8 @@
end

Then /^I should successfully run "([^\"]*)"$/ do |command|
system("cd #{@current_directory} && #{command}").should be_true
env_vars = command =~ /^rake/ ? "BUNDLE_GEMFILE=#{@current_directory}/Gemfile" : ''
system("cd #{@current_directory} && #{env_vars} #{command}").should be_true
end

Then /^I should see "([^\"]*)" when running "([^\"]*)"$/ do |expected_response, command|
Expand Down

0 comments on commit 3bcd95c

Please sign in to comment.