Permalink
Browse files

Tag the whole feature instead of tagging every scenario

  • Loading branch information...
1 parent 1df64a1 commit d50f30ec660e1d891d605ba540e645636e3401da @jferris jferris committed Nov 11, 2011
Showing with 62 additions and 70 deletions.
  1. +1 −8 features/appraisals.feature
  2. +61 −62 features/gemspec.feature
@@ -1,3 +1,4 @@
+@disable-bundler
Feature: run a rake task through several appraisals
Background:
@@ -41,47 +42,39 @@ Feature: run a rake task through several appraisals
"""
When I successfully run `bundle exec rake appraisal:install --trace`
- @disable-bundler
Scenario: run a specific task with one appraisal
When I successfully run `bundle exec rake appraisal:1.3.0 version --trace`
Then the output should contain "Loaded 1.3.0"
- @disable-bundler
Scenario: run a specific task with all appraisals
When I successfully run `bundle exec rake appraisal version --trace`
Then the output should contain "Loaded 1.3.0"
And the output should contain "Loaded 1.3.2"
And the output should not contain "Invoke version"
- @disable-bundler
Scenario: run the default task with one appraisal
When I successfully run `bundle exec rake appraisal:1.3.0 --trace`
Then the output should contain "Loaded 1.3.0"
- @disable-bundler
Scenario: run the default task with all appraisals
When I successfully run `bundle exec rake appraisal --trace`
Then the output should contain "Loaded 1.3.0"
And the output should contain "Loaded 1.3.2"
- @disable-bundler
Scenario: run a failing task with one appraisal
When I run `bundle exec rake appraisal:1.3.0 fail --trace`
Then the output should contain "Fail 1.3.0"
And the exit status should be 1
- @disable-bundler
Scenario: run a failing task with all appraisals
When I run `bundle exec rake appraisal fail --trace`
Then the output should contain "Fail 1.3.2"
But the output should not contain "Fail 1.3.0"
And the exit status should be 1
- @disable-bundler
Scenario: run a cleanup task
When I run `bundle exec rake appraisal:cleanup --trace`
Then a file named "gemfiles/1.3.0.gemfile" should not exist
And a file named "gemfiles/1.3.0.gemfile.lock" should not exist
And a file named "gemfiles/1.3.2.gemfile" should not exist
And a file named "gemfiles/1.3.2.gemfile.lock" should not exist
-
View
@@ -1,70 +1,69 @@
+@disable-bundler
Feature: appraisals using an existing gemspec
-Background:
- Given a directory named "gemspecced"
- When I cd to "gemspecced"
- And I write to "gemspecced.gemspec" with:
- """
- Gem::Specification.new do |s|
- s.name = %q{gemspecced}
- s.version = '0.1'
- s.summary = %q{featureful!}
+ Background:
+ Given a directory named "gemspecced"
+ When I cd to "gemspecced"
+ And I write to "gemspecced.gemspec" with:
+ """
+ Gem::Specification.new do |s|
+ s.name = %q{gemspecced}
+ s.version = '0.1'
+ s.summary = %q{featureful!}
- s.add_runtime_dependency('mocha')
- s.add_development_dependency('factory_girl', '1.3.2')
- end
- """
- And a directory named "specdir"
- And I write to "specdir/gemspecced.gemspec" with:
- """
- Gem::Specification.new do |s|
- s.name = %q{gemspecced}
- s.version = '0.1'
- s.summary = %q{featureful!}
+ s.add_runtime_dependency('mocha')
+ s.add_development_dependency('factory_girl', '1.3.2')
+ end
+ """
+ And a directory named "specdir"
+ And I write to "specdir/gemspecced.gemspec" with:
+ """
+ Gem::Specification.new do |s|
+ s.name = %q{gemspecced}
+ s.version = '0.1'
+ s.summary = %q{featureful!}
- s.add_runtime_dependency('mocha')
- s.add_development_dependency('factory_girl', '1.3.0')
- end
- """
- And I write to "Appraisals" with:
- """
- appraise "stock" do
- gem "shoulda", "2.11.3"
- end
- """
- When I write to "Rakefile" with:
- """
- require 'rubygems'
- require 'bundler/setup'
- require 'appraisal'
- task :version do
- require 'factory_girl'
- puts "Loaded #{Factory::VERSION}"
- end
- """
+ s.add_runtime_dependency('mocha')
+ s.add_development_dependency('factory_girl', '1.3.0')
+ end
+ """
+ And I write to "Appraisals" with:
+ """
+ appraise "stock" do
+ gem "shoulda", "2.11.3"
+ end
+ """
+ When I write to "Rakefile" with:
+ """
+ require 'rubygems'
+ require 'bundler/setup'
+ require 'appraisal'
+ task :version do
+ require 'factory_girl'
+ puts "Loaded #{Factory::VERSION}"
+ end
+ """
-@disable-bundler
-Scenario: run a gem in the gemspec
- And I write to "Gemfile" with:
- """
- source "http://rubygems.org"
- 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`
- Then the output should contain "Loaded 1.3.2"
+ Scenario: run a gem in the gemspec
+ And I write to "Gemfile" with:
+ """
+ source "http://rubygems.org"
+ 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`
+ Then the output should contain "Loaded 1.3.2"
-@disable-bundler
-Scenario: run a gem in the gemspec via path
- And I write to "Gemfile" with:
- """
- source "http://rubygems.org"
- gemspec :path => './specdir'
- """
- 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`
- Then the output should contain "Loaded 1.3.0"
+ Scenario: run a gem in the gemspec via path
+ And I write to "Gemfile" with:
+ """
+ source "http://rubygems.org"
+ gemspec :path => './specdir'
+ """
+ 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`
+ Then the output should contain "Loaded 1.3.0"

0 comments on commit d50f30e

Please sign in to comment.