diff --git a/features/pull.feature b/features/pull.feature index d4388d1..af7ceca 100644 --- a/features/pull.feature +++ b/features/pull.feature @@ -10,4 +10,4 @@ Feature: Pull Given there is a wiki with Cucumber features defined And there are local features When I pull features - Then the local features should match the wiki + Then the local features should match the wiki \ No newline at end of file diff --git a/features/support/env.rb b/features/support/env.rb index ee1fb21..6578e63 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -44,7 +44,11 @@ abort "Failed to clone demo repo to #{@repo_with_features}." if $? != 0 puts "Installing gems for demo repo." - Bundler.with_clean_env do + if defined?(Bundler) + Bundler.with_clean_env do + system "bundle install --path vendor/bundle &> /dev/null" + end + else system "bundle install --path vendor/bundle &> /dev/null" end abort "Failed to install gems for demo repo #{@repo_with_features}" if $? != 0 diff --git a/lib/gitnesse/cli/task/run.rb b/lib/gitnesse/cli/task/run.rb index 49cbc85..d364cc4 100644 --- a/lib/gitnesse/cli/task/run.rb +++ b/lib/gitnesse/cli/task/run.rb @@ -68,7 +68,11 @@ def remove_hooks def run_features puts " Running cucumber." puts ' -------------------', '' - system "cucumber #{@config.features_dir}" + if defined?(Bundler) + Bundler.with_clean_env { system "cucumber #{@config.features_dir}" } + else + system "cucumber #{@config.features_dir}" + end puts ' -------------------', '' end