Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Commit

Permalink
Move bundler-running into a function so we can reuse it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Oct 21, 2011
1 parent c34d796 commit 8e34e56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion features/step_definitions/bundler_steps.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
When /^I bundle$/ do
When %{I successfully run `bundle --gemfile=./Gemfile --local || bundle --gemfile=./Gemfile`}
run_bundler
end

When /^I rebundle$/ do
Expand Down
3 changes: 1 addition & 2 deletions features/step_definitions/rails_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
run_simple("rails new rake-tasks")
cd('rake-tasks')
append_to_file('Gemfile', "gem 'kumade', :path => '#{PROJECT_PATH}'")

When "I bundle"
run_bundler
end
7 changes: 7 additions & 0 deletions features/support/bundler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module BundlerHelpers
def run_bundler
run_simple('bundle --gemfile=./Gemfile --local || bundle --gemfile=./Gemfile')
end
end

World(BundlerHelpers)

0 comments on commit 8e34e56

Please sign in to comment.