Skip to content

Commit

Permalink
Something sarcastic about downloading things from the internet during a
Browse files Browse the repository at this point in the history
test
  • Loading branch information
mattwynne committed Nov 2, 2011
1 parent 5263cbb commit baea748
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
14 changes: 4 additions & 10 deletions features/step_definitions/cucumber_rails_steps.rb
Expand Up @@ -30,6 +30,10 @@ def prepare_aruba_report
sleep(1) sleep(1)
end end
end end

def fixture(path)
File.expand_path(File.dirname(__FILE__) + "./../support/fixtures/#{path}")
end
end end
World(CucumberRailsHelper) World(CucumberRailsHelper)


Expand Down Expand Up @@ -60,13 +64,3 @@ def prepare_aruba_report
overwrite_file('features/support/env.rb', "require 'cucumber/rails'\n") overwrite_file('features/support/env.rb', "require 'cucumber/rails'\n")
create_web_steps create_web_steps
end 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
28 changes: 28 additions & 0 deletions 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
Binary file added features/support/fixtures/bundler-1.0.21.gem
Binary file not shown.
Binary file added features/support/fixtures/bundler-1.1.rc.gem
Binary file not shown.

0 comments on commit baea748

Please sign in to comment.