Skip to content

Commit

Permalink
render_template_matcher.feature
Browse files Browse the repository at this point in the history
- Closes rspec#170.
  • Loading branch information
justinko authored and dchelimsky committed Aug 23, 2010
1 parent 732a922 commit 1f7adde
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions features/matchers/render_template_matcher.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Feature: render_template matcher

This matcher just delegates to the Rails assertion method
"assert_template". For complete info on the available options,
please take a look at the Rails documentation.

This method is available in spec/controllers and spec/requests.

Scenario: render_template with three possible options
Given a file named "spec/controllers/gadgets_spec.rb" with:
"""
require "spec_helper"
describe GadgetsController do
describe "#index" do
subject { get :index }
specify { should render_template(:index) }
specify { should render_template("index") }
specify { should render_template("gadgets/index") }
end
end
"""
When I run "rspec spec/controllers/gadgets_spec.rb"
Then the output should contain "3 examples, 0 failures"

0 comments on commit 1f7adde

Please sign in to comment.