Browse files

Use dummy gems so we don't need to bundle install in cucumber

  • Loading branch information...
1 parent ca2d12f commit 96ac4436519e39d7861d113b8965d28c02313a86 @jferris jferris committed Nov 11, 2011
Showing with 25 additions and 17 deletions.
  1. +14 −9 features/appraisals.feature
  2. +11 −8 features/gemspec.feature
View
23 features/appraisals.feature
@@ -3,12 +3,16 @@ Feature: run a rake task through several appraisals
Background:
Given a directory named "projecto"
+ And the following installed dummy gems:
+ | name | version |
+ | dummy_girl | 1.3.0 |
+ | dummy_girl | 1.3.2 |
When I cd to "projecto"
And I write to "Gemfile" with:
"""
source "http://rubygems.org"
- gem "rake", "0.8.7"
- gem "factory_girl"
+ gem "rake"
+ gem "dummy_girl"
group :assets do
gem 'sass-rails', " ~> 3.1.0"
end
@@ -17,10 +21,10 @@ Feature: run a rake task through several appraisals
And I write to "Appraisals" with:
"""
appraise "1.3.2" do
- gem "factory_girl", "1.3.2"
+ gem "dummy_girl", "1.3.2"
end
appraise "1.3.0" do
- gem "factory_girl", "1.3.0"
+ gem "dummy_girl", "1.3.0"
gem "rake", "0.9.0"
end
"""
@@ -30,17 +34,18 @@ Feature: run a rake task through several appraisals
require 'bundler/setup'
require 'appraisal'
task :version do
- require 'factory_girl'
- puts "Loaded #{Factory::VERSION}"
+ require 'dummy_girl'
+ puts "Loaded #{$dummy_girl_version}"
end
task :fail do
- require 'factory_girl'
- puts "Fail #{Factory::VERSION}"
+ require 'dummy_girl'
+ puts "Fail #{$dummy_girl_version}"
raise
end
task :default => :version
"""
- When I successfully run `bundle exec rake appraisal:install --trace`
+ When I successfully run `bundle install --local`
+ And I successfully run `bundle exec rake appraisal:install --trace`
Scenario: run a specific task with one appraisal
When I successfully run `bundle exec rake appraisal:1.3.0 version --trace`
View
19 features/gemspec.feature
@@ -3,6 +3,10 @@ Feature: appraisals using an existing gemspec
Background:
Given a directory named "gemspecced"
+ And the following installed dummy gems:
+ | name | version |
+ | dummy_girl | 1.3.0 |
+ | dummy_girl | 1.3.2 |
When I cd to "gemspecced"
And I write to "gemspecced.gemspec" with:
"""
@@ -11,8 +15,7 @@ Feature: appraisals using an existing gemspec
s.version = '0.1'
s.summary = %q{featureful!}
- s.add_runtime_dependency('mocha')
- s.add_development_dependency('factory_girl', '1.3.2')
+ s.add_development_dependency('dummy_girl', '1.3.2')
end
"""
And a directory named "specdir"
@@ -23,8 +26,7 @@ Feature: appraisals using an existing gemspec
s.version = '0.1'
s.summary = %q{featureful!}
- s.add_runtime_dependency('mocha')
- s.add_development_dependency('factory_girl', '1.3.0')
+ s.add_development_dependency('dummy_girl', '1.3.0')
end
"""
And I write to "Appraisals" with:
@@ -39,8 +41,8 @@ Feature: appraisals using an existing gemspec
require 'bundler/setup'
require 'appraisal'
task :version do
- require 'factory_girl'
- puts "Loaded #{Factory::VERSION}"
+ require 'dummy_girl'
+ puts "Loaded #{$dummy_girl_version}"
end
"""
@@ -51,8 +53,9 @@ Feature: appraisals using an existing gemspec
gemspec
"""
When I add "appraisal" from this project as a dependency
- When I successfully run `bundle exec rake appraisal:install --trace`
- When I run `bundle exec rake appraisal version --trace`
+ And I successfully run `bundle install --local`
+ And I successfully run `bundle exec rake appraisal:install --trace`
+ And I run `bundle exec rake appraisal version --trace`
Then the output should contain "Loaded 1.3.2"

0 comments on commit 96ac443

Please sign in to comment.