Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 96ac4436519e39d7861d113b8965d28c02313a86 1 parent ca2d12f
Joe Ferris jferris authored

Showing 2 changed files with 25 additions and 17 deletions. Show diff stats Hide diff stats

  1. +14 9 features/appraisals.feature
  2. +11 8 features/gemspec.feature
23 features/appraisals.feature
@@ -3,12 +3,16 @@ Feature: run a rake task through several appraisals
3 3
4 4 Background:
5 5 Given a directory named "projecto"
  6 + And the following installed dummy gems:
  7 + | name | version |
  8 + | dummy_girl | 1.3.0 |
  9 + | dummy_girl | 1.3.2 |
6 10 When I cd to "projecto"
7 11 And I write to "Gemfile" with:
8 12 """
9 13 source "http://rubygems.org"
10   - gem "rake", "0.8.7"
11   - gem "factory_girl"
  14 + gem "rake"
  15 + gem "dummy_girl"
12 16 group :assets do
13 17 gem 'sass-rails', " ~> 3.1.0"
14 18 end
@@ -17,10 +21,10 @@ Feature: run a rake task through several appraisals
17 21 And I write to "Appraisals" with:
18 22 """
19 23 appraise "1.3.2" do
20   - gem "factory_girl", "1.3.2"
  24 + gem "dummy_girl", "1.3.2"
21 25 end
22 26 appraise "1.3.0" do
23   - gem "factory_girl", "1.3.0"
  27 + gem "dummy_girl", "1.3.0"
24 28 gem "rake", "0.9.0"
25 29 end
26 30 """
@@ -30,17 +34,18 @@ Feature: run a rake task through several appraisals
30 34 require 'bundler/setup'
31 35 require 'appraisal'
32 36 task :version do
33   - require 'factory_girl'
34   - puts "Loaded #{Factory::VERSION}"
  37 + require 'dummy_girl'
  38 + puts "Loaded #{$dummy_girl_version}"
35 39 end
36 40 task :fail do
37   - require 'factory_girl'
38   - puts "Fail #{Factory::VERSION}"
  41 + require 'dummy_girl'
  42 + puts "Fail #{$dummy_girl_version}"
39 43 raise
40 44 end
41 45 task :default => :version
42 46 """
43   - When I successfully run `bundle exec rake appraisal:install --trace`
  47 + When I successfully run `bundle install --local`
  48 + And I successfully run `bundle exec rake appraisal:install --trace`
44 49
45 50 Scenario: run a specific task with one appraisal
46 51 When I successfully run `bundle exec rake appraisal:1.3.0 version --trace`
19 features/gemspec.feature
@@ -3,6 +3,10 @@ Feature: appraisals using an existing gemspec
3 3
4 4 Background:
5 5 Given a directory named "gemspecced"
  6 + And the following installed dummy gems:
  7 + | name | version |
  8 + | dummy_girl | 1.3.0 |
  9 + | dummy_girl | 1.3.2 |
6 10 When I cd to "gemspecced"
7 11 And I write to "gemspecced.gemspec" with:
8 12 """
@@ -11,8 +15,7 @@ Feature: appraisals using an existing gemspec
11 15 s.version = '0.1'
12 16 s.summary = %q{featureful!}
13 17
14   - s.add_runtime_dependency('mocha')
15   - s.add_development_dependency('factory_girl', '1.3.2')
  18 + s.add_development_dependency('dummy_girl', '1.3.2')
16 19 end
17 20 """
18 21 And a directory named "specdir"
@@ -23,8 +26,7 @@ Feature: appraisals using an existing gemspec
23 26 s.version = '0.1'
24 27 s.summary = %q{featureful!}
25 28
26   - s.add_runtime_dependency('mocha')
27   - s.add_development_dependency('factory_girl', '1.3.0')
  29 + s.add_development_dependency('dummy_girl', '1.3.0')
28 30 end
29 31 """
30 32 And I write to "Appraisals" with:
@@ -39,8 +41,8 @@ Feature: appraisals using an existing gemspec
39 41 require 'bundler/setup'
40 42 require 'appraisal'
41 43 task :version do
42   - require 'factory_girl'
43   - puts "Loaded #{Factory::VERSION}"
  44 + require 'dummy_girl'
  45 + puts "Loaded #{$dummy_girl_version}"
44 46 end
45 47 """
46 48
@@ -51,8 +53,9 @@ Feature: appraisals using an existing gemspec
51 53 gemspec
52 54 """
53 55 When I add "appraisal" from this project as a dependency
54   - When I successfully run `bundle exec rake appraisal:install --trace`
55   - When I run `bundle exec rake appraisal version --trace`
  56 + And I successfully run `bundle install --local`
  57 + And I successfully run `bundle exec rake appraisal:install --trace`
  58 + And I run `bundle exec rake appraisal version --trace`
56 59 Then the output should contain "Loaded 1.3.2"
57 60
58 61

0 comments on commit 96ac443

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