Skip to content

Commit

Permalink
remove rendering engine and mime type from calls to describe and rend…
Browse files Browse the repository at this point in the history
…er in docs and cukes
  • Loading branch information
dchelimsky committed Feb 1, 2012
1 parent 50a27f2 commit ff96af6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -260,15 +260,15 @@ assigns(:widgets).should eq(expected_value)
View specs live in spec/views, and mix in ActionView::TestCase::Behavior.

```ruby
describe "events/index.html.erb" do
describe "events/index" do
it "renders _event partial for each event" do
assign(:events, [stub_model(Event), stub_model(Event)])
render
view.should render_template(:partial => "_event", :count => 2)
end
end

describe "events/show.html.erb" do
describe "events/show" do
it "displays the event location" do
assign(:event, stub_model(Event,
:location => "Chicago"
Expand Down
6 changes: 3 additions & 3 deletions features/view_specs/inferred_controller_path.feature
Expand Up @@ -5,7 +5,7 @@ Feature: view spec infers controller path and action
"""
require "spec_helper"
describe "widgets/new.html.erb" do
describe "widgets/new" do
it "infers the controller path" do
controller.request.path_parameters["controller"].should eq("widgets")
end
Expand All @@ -19,7 +19,7 @@ Feature: view spec infers controller path and action
"""
require "spec_helper"
describe "widgets/new.html.erb" do
describe "widgets/new" do
it "infers the controller path" do
controller.request.path_parameters["action"].should eq("new")
end
Expand All @@ -33,7 +33,7 @@ Feature: view spec infers controller path and action
"""
require "spec_helper"
describe "widgets/_form.html.erb" do
describe "widgets/_form" do
it "includes a link to new" do
controller.request.path_parameters["action"].should be_nil
end
Expand Down
4 changes: 2 additions & 2 deletions features/view_specs/stub_template.feature
Expand Up @@ -8,7 +8,7 @@ Feature: stub template
"""
require "spec_helper"
describe "gadgets/list.html.erb" do
describe "gadgets/list" do
it "renders the gadget partial for each gadget" do
assign(:gadgets, [
mock_model(Gadget, :id => 1, :name => "First"),
Expand All @@ -34,7 +34,7 @@ Feature: stub template
"""
require "spec_helper"
describe "gadgets/edit.html.erb" do
describe "gadgets/edit" do
before(:each) do
@gadget = assign(:gadget, stub_model(Gadget))
end
Expand Down
6 changes: 3 additions & 3 deletions features/view_specs/view_spec.feature
Expand Up @@ -7,7 +7,7 @@ Feature: view spec
"""
require "spec_helper"
describe "widgets/index.html.erb" do
describe "widgets/index" do
it "displays all the widgets" do
assign(:widgets, [
stub_model(Widget, :name => "slicer"),
Expand All @@ -29,7 +29,7 @@ Feature: view spec
"""
require "spec_helper"
describe "widgets/index.html.erb" do
describe "widgets/index" do
context "with 2 widgets" do
before(:each) do
Expand Down Expand Up @@ -145,7 +145,7 @@ Feature: view spec
"""
require 'spec_helper'
describe 'secrets/index.html.erb' do
describe 'secrets/index' do
before do
view.stub(:admin?).and_return(true)
end
Expand Down

0 comments on commit ff96af6

Please sign in to comment.