Skip to content
Browse files

Something sarcastic about downloading things from the internet during a

test
  • Loading branch information...
1 parent 5263cbb commit baea7487977029817a5981a6f9e681ca4e4bbd37 @mattwynne mattwynne committed
View
14 features/step_definitions/cucumber_rails_steps.rb
@@ -30,6 +30,10 @@ def prepare_aruba_report
sleep(1)
end
end
+
+ def fixture(path)
+ File.expand_path(File.dirname(__FILE__) + "./../support/fixtures/#{path}")
+ end
end
World(CucumberRailsHelper)
@@ -60,13 +64,3 @@ def prepare_aruba_report
overwrite_file('features/support/env.rb', "require 'cucumber/rails'\n")
create_web_steps
end
-
-Before('@bundler-pre') do
- run_simple 'gem uninstall bundler'
- run_simple 'gem install bundler --pre'
-end
-
-After('@bundler-pre') do
- run_simple 'gem uninstall bundler'
- run_simple 'gem install bundler'
-end
View
28 features/support/bundler_pre_support.rb
@@ -0,0 +1,28 @@
+module BundlerPreHelper
+ def bundler
+ fixture 'bundler-1.0.21.gem'
+ end
+
+ def bundler_pre
+ fixture 'bundler-1.1.rc.gem'
+ end
+
+ def gem_install(path)
+ run_simple("gem install #{path} --no-ri --no-rdoc")
+ end
+
+ def gem_uninstall(path)
+ run_simple("gem uninstall #{path}")
+ end
+end
+
+Before('@bundler-pre') do
+ extend(BundlerPreHelper)
+ gem_uninstall bundler
+ gem_install bundler_pre
+end
+
+After('@bundler-pre') do
+ gem_uninstall bundler_pre
+ gem_install bundler
+end
View
BIN features/support/fixtures/bundler-1.0.21.gem
Binary file not shown.
View
BIN features/support/fixtures/bundler-1.1.rc.gem
Binary file not shown.

0 comments on commit baea748

Please sign in to comment.
Something went wrong with that request. Please try again.