Skip to content

Commit

Permalink
upgrade cucumber and aruba
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Mar 25, 2011
1 parent ca78581 commit 2a0c0d7
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 71 deletions.
5 changes: 2 additions & 3 deletions Gemfile-base
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ source "http://rubygems.org"
end end


gem 'sqlite3-ruby', :require => 'sqlite3' gem 'sqlite3-ruby', :require => 'sqlite3'
gem "rake", "0.8.7" gem "cucumber", "~> 0.10.2"
gem "cucumber", "0.10.0" gem "aruba", "~> 0.3.5"
gem "aruba", "0.2.2"
gem "rcov", "0.9.9" gem "rcov", "0.9.9"
gem "relish", "0.2.0" gem "relish", "0.2.0"
gem "guard-rspec", "0.1.9" gem "guard-rspec", "0.1.9"
Expand Down
4 changes: 2 additions & 2 deletions features/controller_specs/anonymous_controller.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: anonymous controller
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass


Scenario: specify error handling in subclass of ApplicationController Scenario: specify error handling in subclass of ApplicationController
Expand Down Expand Up @@ -74,5 +74,5 @@ Feature: anonymous controller
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass
2 changes: 1 addition & 1 deletion features/controller_specs/controller_spec.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Feature: controller spec
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the example should pass Then the example should pass
4 changes: 2 additions & 2 deletions features/controller_specs/isolation_from_views.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: views are stubbed by default
end end
end end
""" """
When I run "rspec ./spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass


Scenario: expect template that is not rendered by controller action (fails) Scenario: expect template that is not rendered by controller action (fails)
Expand All @@ -44,6 +44,6 @@ Feature: views are stubbed by default
end end
end end
""" """
When I run "rspec ./spec" When I run `rspec spec`
Then the output should contain "1 example, 1 failure" Then the output should contain "1 example, 1 failure"


6 changes: 3 additions & 3 deletions features/controller_specs/render_views.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: render_views
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass


Scenario: render_views on and off in nested groups Scenario: render_views on and off in nested groups
Expand Down Expand Up @@ -71,7 +71,7 @@ Feature: render_views
end end
end end
""" """
When I run "rspec spec --format documentation" When I run `rspec spec --format documentation`
Then the output should contain: Then the output should contain:
""" """
WidgetsController WidgetsController
Expand Down Expand Up @@ -109,6 +109,6 @@ Feature: render_views
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass


6 changes: 3 additions & 3 deletions features/helper_specs/helper_spec.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: helper spec
end end
end end
""" """
When I run "rspec spec/helpers/application_helper_spec.rb" When I run `rspec spec/helpers/application_helper_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: helper method that accesses an instance variable Scenario: helper method that accesses an instance variable
Expand All @@ -50,7 +50,7 @@ Feature: helper spec
end end
end end
""" """
When I run "rspec spec/helpers/application_helper_spec.rb" When I run `rspec spec/helpers/application_helper_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: application helper is included in helper object Scenario: application helper is included in helper object
Expand Down Expand Up @@ -83,5 +83,5 @@ Feature: helper spec
end end
end end
""" """
When I run "rspec spec/helpers/widgets_helper_spec.rb" When I run `rspec spec/helpers/widgets_helper_spec.rb`
Then the examples should all pass Then the examples should all pass
4 changes: 2 additions & 2 deletions features/mailer_specs/url_helpers.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: URL helpers in mailer examples
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass


Scenario: using URL helpers without default options Scenario: using URL helpers without default options
Expand All @@ -34,5 +34,5 @@ Feature: URL helpers in mailer examples
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass
4 changes: 2 additions & 2 deletions features/matchers/new_record_matcher.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: be_a_new matcher
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: example spec using be_a_new.with Scenario: example spec using be_a_new.with
Expand Down Expand Up @@ -66,5 +66,5 @@ Feature: be_a_new matcher
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass
2 changes: 1 addition & 1 deletion features/matchers/redirect_to_matcher.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ Feature: redirect_to matcher
end end
end end
""" """
When I run "rspec spec/controllers/widgets_controller_spec.rb" When I run `rspec spec/controllers/widgets_controller_spec.rb`
Then the examples should all pass Then the examples should all pass
2 changes: 1 addition & 1 deletion features/matchers/render_template_matcher.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Feature: render_template matcher
end end
end end
""" """
When I run "rspec spec/controllers/gadgets_spec.rb" When I run `rspec spec/controllers/gadgets_spec.rb`
Then the examples should all pass Then the examples should all pass
10 changes: 5 additions & 5 deletions features/mocks/mock_model.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: mock_model
end end
end end
""" """
When I run "rspec spec/models/car_spec.rb" When I run `rspec spec/models/car_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: passing a string that represents an existing constant Scenario: passing a string that represents an existing constant
Expand All @@ -51,7 +51,7 @@ Feature: mock_model
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: passing a class that does not extend ActiveModel::Naming Scenario: passing a class that does not extend ActiveModel::Naming
Expand All @@ -65,7 +65,7 @@ Feature: mock_model
end end
end end
""" """
When I run "rspec spec/models/string_spec.rb" When I run `rspec spec/models/string_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: passing an Active Record constant Scenario: passing an Active Record constant
Expand Down Expand Up @@ -94,7 +94,7 @@ Feature: mock_model
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: passing an Active Record constant with method stubs Scenario: passing an Active Record constant with method stubs
Expand Down Expand Up @@ -127,5 +127,5 @@ Feature: mock_model
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass
4 changes: 2 additions & 2 deletions features/mocks/stub_model.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: stub_model
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: passing an Active Record constant with a block of stubs Scenario: passing an Active Record constant with a block of stubs
Expand All @@ -54,5 +54,5 @@ Feature: stub_model
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass
2 changes: 1 addition & 1 deletion features/model_specs/errors_on.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Feature: errors_on
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass
8 changes: 4 additions & 4 deletions features/model_specs/transactional_examples.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: transactional examples
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: run in transactions (explicit) Scenario: run in transactions (explicit)
Expand All @@ -47,7 +47,7 @@ Feature: transactional examples
end end
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: disable transactions (explicit) Scenario: disable transactions (explicit)
Expand Down Expand Up @@ -76,7 +76,7 @@ Feature: transactional examples
after(:all) { Widget.destroy_all } after(:all) { Widget.destroy_all }
end end
""" """
When I run "rspec spec/models/widget_spec.rb" When I run `rspec spec/models/widget_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: run in transactions with fixture Scenario: run in transactions with fixture
Expand All @@ -96,7 +96,7 @@ Feature: transactional examples
one: one:
name: MyString name: MyString
""" """
When I run "rspec spec/models/thing_spec.rb" When I run `rspec spec/models/thing_spec.rb`
Then the examples should all pass Then the examples should all pass




Expand Down
10 changes: 5 additions & 5 deletions features/routing_specs/be_routable_matcher.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: be_routable matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the output should contain "1 example, 1 failure" Then the output should contain "1 example, 1 failure"


Scenario: specify non-routeable route should not be routable (passes) Scenario: specify non-routeable route should not be routable (passes)
Expand All @@ -31,7 +31,7 @@ Feature: be_routable matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: specify routeable route should be routable (passes) Scenario: specify routeable route should be routable (passes)
Expand All @@ -46,7 +46,7 @@ Feature: be_routable matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: specify non-routeable route should be routable (fails) Scenario: specify non-routeable route should be routable (fails)
Expand All @@ -61,7 +61,7 @@ Feature: be_routable matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the output should contain "1 example, 1 failure" Then the output should contain "1 example, 1 failure"


Scenario: be_routable in a controller spec Scenario: be_routable in a controller spec
Expand All @@ -76,5 +76,5 @@ Feature: be_routable matcher
end end
""" """


When I run "rspec spec/controllers/widgets_controller_spec.rb" When I run `rspec spec/controllers/widgets_controller_spec.rb`
Then the examples should all pass Then the examples should all pass
2 changes: 1 addition & 1 deletion features/routing_specs/named_routes.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Feature: named routes
end end
end end
""" """
When I run "rspec spec" When I run `rspec spec`
Then the examples should all pass Then the examples should all pass
6 changes: 3 additions & 3 deletions features/routing_specs/route_to_matcher.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature: route_to matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: passing route spec with verbose syntax Scenario: passing route spec with verbose syntax
Expand All @@ -39,7 +39,7 @@ Feature: route_to matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the examples should all pass Then the examples should all pass


Scenario: route spec for a route that doesn't exist (fails) Scenario: route spec for a route that doesn't exist (fails)
Expand All @@ -54,5 +54,5 @@ Feature: route_to matcher
end end
""" """


When I run "rspec spec/routing/widgets_routing_spec.rb" When I run `rspec spec/routing/widgets_routing_spec.rb`
Then the output should contain "1 failure" Then the output should contain "1 failure"
2 changes: 1 addition & 1 deletion features/step_definitions/additional_cli_steps.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
Then /^the example(s)? should( all)? pass$/ do |_, _| Then /^the example(s)? should( all)? pass$/ do |_, _|
Then %q{the exit status should be 0}
Then %q{the output should contain "0 failures"} Then %q{the output should contain "0 failures"}
Then %q{the exit status should be 0}
end end
18 changes: 2 additions & 16 deletions features/support/env.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,19 +1,8 @@
require 'aruba' require 'aruba/cucumber'
require 'webrat' require 'webrat'


module Aruba::Api
alias_method :orig_run, :run

def run(cmd, fail_on_error=false)
if cmd =~ /^rspec/
orig_run("bundle exec #{cmd}", fail_on_error)
else
orig_run(cmd, fail_on_error)
end
end
end

Before do Before do
@aruba_timeout_seconds = 10
unset_bundler_env_vars unset_bundler_env_vars
end end


Expand Down Expand Up @@ -41,7 +30,6 @@ def copy(file_or_dir)
system "cp -r #{source} #{target}" system "cp -r #{source} #{target}"
end end



Before do Before do
steps %Q{ steps %Q{
Given a directory named "spec" Given a directory named "spec"
Expand All @@ -56,10 +44,8 @@ def copy(file_or_dir)
["spec/spec_helper.rb"].each do |file_or_dir| ["spec/spec_helper.rb"].each do |file_or_dir|
write_symlink("tmp/example_app/#{file_or_dir}") write_symlink("tmp/example_app/#{file_or_dir}")
end end

end end


Around do |scenario, block| Around do |scenario, block|
Bundler.with_clean_env &block Bundler.with_clean_env &block
end end

6 changes: 3 additions & 3 deletions features/view_specs/inferred_controller_path.feature
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: view spec infers controller path and action
end end
end end
""" """
When I run "rspec spec/views" When I run `rspec spec/views`
Then the examples should all pass Then the examples should all pass


Scenario: infer action Scenario: infer action
Expand All @@ -25,7 +25,7 @@ Feature: view spec infers controller path and action
end end
end end
""" """
When I run "rspec spec/views" When I run `rspec spec/views`
Then the examples should all pass Then the examples should all pass


Scenario: do not infer action in a partial Scenario: do not infer action in a partial
Expand All @@ -39,6 +39,6 @@ Feature: view spec infers controller path and action
end end
end end
""" """
When I run "rspec spec/views" When I run `rspec spec/views`
Then the examples should all pass Then the examples should all pass


Loading

0 comments on commit 2a0c0d7

Please sign in to comment.