Skip to content
Browse files

cukes

  • Loading branch information...
1 parent d9dc1fd commit 78a33075d6a384833d91c969e550036633c4d5ca @dchelimsky dchelimsky committed
View
6 features/.nav
@@ -1,6 +1,6 @@
-- GettingStarted.md (Getting started)
-- Upgrade.md
-- Generators.md (Rails generators)
+- GettingStarted.md (Start from scratch)
+- Upgrade.md (Upgrade from 1.x)
+- Generators.md (Generators)
- Autotest.md (Autotest integration)
- transactional_examples.feature
- model_specs:
View
5 features/controller_specs/README.md
@@ -2,8 +2,9 @@ Controller specs live in `spec/controllers` or any example group with
`:type => :controller`.
A controller spec is an RSpec wrapper for a Rails functional test
-(ActionController::TestCase::Behavior). It allows you to simulate a single
-http request in each example, and then specify expected outcomes, including:
+([ActionController::TestCase::Behavior](https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/test_case.rb)).
+It allows you to simulate a single http request in each example, and then
+specify expected outcomes such as:
* rendered templates
* redirects
View
4 features/controller_specs/anonymous_controller.feature
@@ -37,7 +37,7 @@ Feature: anonymous controller
end
"""
When I run "rspec spec"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: specify error handling in subclass of ApplicationController
Given a file named "spec/controllers/application_controller_subclass_spec.rb" with:
@@ -75,4 +75,4 @@ Feature: anonymous controller
end
"""
When I run "rspec spec"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
4 features/controller_specs/isolation_from_views.feature
@@ -1,6 +1,6 @@
Feature: views are stubbed by default
- By default, controller specs stub views with template that renders an empty
+ By default, controller specs stub views with a template that renders an empty
string instead of the views in the app. This allows you specify which view
template an action should try to render regardless of whether the template
compiles cleanly.
@@ -28,7 +28,7 @@ Feature: views are stubbed by default
end
"""
When I run "rspec ./spec"
- Then the output should contain "2 examples, 0 failures"
+ Then the examples should all pass
Scenario: expect template that is not rendered by controller action (fails)
Given a file named "spec/controllers/widgets_controller_spec.rb" with:
View
6 features/helper_specs/helper_spec.feature
@@ -26,7 +26,7 @@ Feature: helper spec
end
"""
When I run "rspec spec/helpers/application_helper_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: helper method that accesses an instance variable
Given a file named "spec/helpers/application_helper_spec.rb" with:
@@ -51,7 +51,7 @@ Feature: helper spec
end
"""
When I run "rspec spec/helpers/application_helper_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: application helper is included in helper object
Given a file named "spec/helpers/widgets_helper_spec.rb" with:
@@ -84,4 +84,4 @@ Feature: helper spec
end
"""
When I run "rspec spec/helpers/widgets_helper_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
4 features/mailer_specs/url_helpers.feature
@@ -16,7 +16,7 @@ Feature: URL helpers in mailer examples
end
"""
When I run "rspec spec"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: using URL helpers without default options
Given a file named "config/initializers/mailer_defaults.rb" with:
@@ -35,4 +35,4 @@ Feature: URL helpers in mailer examples
end
"""
When I run "rspec spec"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
4 features/matchers/new_record_matcher.feature
@@ -25,7 +25,7 @@ Feature: be_a_new matcher
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the examples should all pass
Scenario: example spec using be_a_new.with
Given a file named "spec/models/widget_spec.rb" with:
@@ -67,4 +67,4 @@ Feature: be_a_new matcher
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the examples should all pass
View
2 features/matchers/redirect_to_matcher.feature
@@ -37,4 +37,4 @@ Feature: redirect_to matcher
end
"""
When I run "rspec spec/controllers/widgets_controller_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the examples should all pass
View
2 features/matchers/render_template_matcher.feature
@@ -22,4 +22,4 @@ Feature: render_template matcher
end
"""
When I run "rspec spec/controllers/gadgets_spec.rb"
- Then the output should contain "3 examples, 0 failures"
+ Then the examples should all pass
View
10 features/mocks/mock_model.feature
@@ -37,7 +37,7 @@ Feature: mock_model
end
"""
When I run "rspec spec/models/car_spec.rb"
- Then the output should contain "3 examples, 0 failures"
+ Then the examples should all pass
Scenario: passing a string that represents an existing constant
Given a file named "spec/models/widget_spec.rb" with:
@@ -52,7 +52,7 @@ Feature: mock_model
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing a class that does not extend ActiveModel::Naming
Given a file named "spec/models/string_spec.rb" with:
@@ -66,7 +66,7 @@ Feature: mock_model
end
"""
When I run "rspec spec/models/string_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing an Active Record constant
Given a file named "spec/models/widget_spec.rb" with:
@@ -95,7 +95,7 @@ Feature: mock_model
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the examples should all pass
Scenario: passing an Active Record constant with method stubs
Given a file named "spec/models/widget_spec.rb" with:
@@ -128,4 +128,4 @@ Feature: mock_model
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "3 examples, 0 failures"
+ Then the examples should all pass
View
4 features/mocks/stub_model.feature
@@ -35,7 +35,7 @@ Feature: stub_model
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the examples should all pass
Scenario: passing an Active Record constant with a block of stubs
Given a file named "spec/models/widget_spec.rb" with:
@@ -55,4 +55,4 @@ Feature: stub_model
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
2 features/model_specs/errors_on.feature
@@ -29,4 +29,4 @@ Feature: errors_on
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "4 examples, 0 failures"
+ Then the examples should all pass
View
8 features/model_specs/transactional_examples.feature
@@ -21,7 +21,7 @@ Feature: transactional examples
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "3 examples, 0 failures"
+ Then the examples should all pass
Scenario: run in transactions (explicit)
Given a file named "spec/models/widget_spec.rb" with:
@@ -48,7 +48,7 @@ Feature: transactional examples
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "3 examples, 0 failures"
+ Then the examples should all pass
Scenario: disable transactions (explicit)
Given a file named "spec/models/widget_spec.rb" with:
@@ -77,7 +77,7 @@ Feature: transactional examples
end
"""
When I run "rspec spec/models/widget_spec.rb"
- Then the output should contain "3 examples, 0 failures"
+ Then the examples should all pass
Scenario: run in transactions with fixture
Given a file named "spec/models/thing_spec.rb" with:
@@ -97,7 +97,7 @@ Feature: transactional examples
name: MyString
"""
When I run "rspec spec/models/thing_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
6 features/routing_specs/be_routable_matcher.feature
@@ -32,7 +32,7 @@ Feature: be_routable matcher
"""
When I run "rspec spec/routing/widgets_routing_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: specify routeable route should be routable (passes)
Given a file named "spec/routing/widgets_routing_spec.rb" with:
@@ -47,7 +47,7 @@ Feature: be_routable matcher
"""
When I run "rspec spec/routing/widgets_routing_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: specify non-routeable route should be routable (fails)
Given a file named "spec/routing/widgets_routing_spec.rb" with:
@@ -77,4 +77,4 @@ Feature: be_routable matcher
"""
When I run "rspec spec/controllers/widgets_controller_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
2 features/routing_specs/named_routes.feature
@@ -15,4 +15,4 @@ Feature: named routes
end
"""
When I run "rspec spec"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
2 features/routing_specs/route_to_matcher.feature
@@ -19,7 +19,7 @@ Feature: route_to matcher
"""
When I run "rspec spec/routing/widgets_routing_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: route spec for a route that doesn't exist (fails)
Given a file named "spec/routing/widgets_routing_spec.rb" with:
View
3 features/step_definitions/rspec_steps.rb → .../step_definitions/additional_cli_steps.rb
@@ -1,5 +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"}
end
-
View
6 features/view_specs/inferred_controller_path.feature
@@ -12,7 +12,7 @@ Feature: view spec infers controller path and action
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: infer action
Given a file named "spec/views/widgets/new.html.erb_spec.rb" with:
@@ -26,7 +26,7 @@ Feature: view spec infers controller path and action
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: do not infer action in a partial
Given a file named "spec/views/widgets/_form.html.erb_spec.rb" with:
@@ -40,5 +40,5 @@ Feature: view spec infers controller path and action
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
4 features/view_specs/stub_template.feature
@@ -27,7 +27,7 @@ Feature: stub template
<%= render :partial => "gadget", :collection => @gadgets %>
"""
When I run "rspec spec/views/gadgets/list.html.erb_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: stub template that exists
Given a file named "spec/views/gadgets/edit.html.erb_spec.rb" with:
@@ -47,5 +47,5 @@ Feature: stub template
end
"""
When I run "rspec spec/views/gadgets/edit.html.erb_spec.rb"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
View
16 features/view_specs/view_spec.feature
@@ -22,7 +22,7 @@ Feature: view spec
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing spec with before and nesting
Given a file named "spec/views/widgets/index.html.erb_spec.rb" with:
@@ -49,7 +49,7 @@ Feature: view spec
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing spec with explicit template rendering
Given a file named "spec/views/widgets/widget.html.erb_spec.rb" with:
@@ -71,7 +71,7 @@ Feature: view spec
<h2><%= @widget.name %></h2>
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing spec with rendering of locals in a partial
Given a file named "spec/views/widgets/_widget.html.erb_spec.rb" with:
@@ -93,7 +93,7 @@ Feature: view spec
<h3><%= widget.name %></h3>
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing spec with rendering of locals in an implicit partial
Given a file named "spec/views/widgets/_widget.html.erb_spec.rb" with:
@@ -115,7 +115,7 @@ Feature: view spec
<h3><%= widget.name %></h3>
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing spec with rendering of text
Given a file named "spec/views/widgets/direct.html.erb_spec.rb" with:
@@ -132,7 +132,7 @@ Feature: view spec
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: passing spec with rendering of Prototype helper update
Given a file named "spec/views/widgets/prototype_update.html.erb_spec.rb" with:
@@ -151,7 +151,7 @@ Feature: view spec
end
"""
When I run "rspec spec/views"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass
Scenario: spec with view that accesses helper_method helpers
Given a file named "app/views/secrets/index.html.erb" with:
@@ -182,4 +182,4 @@ Feature: view spec
end
"""
When I run "rspec spec/views/secrets"
- Then the output should contain "1 example, 0 failures"
+ Then the examples should all pass

0 comments on commit 78a3307

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