Permalink
Browse files

remove rendering engine and mime type from calls to describe and rend…

…er in docs and cukes
  • Loading branch information...
1 parent 50a27f2 commit ff96af6ba9dbe3a93020dd4e0978235cdad3234b @dchelimsky dchelimsky committed Feb 1, 2012
View
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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"),
@@ -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
@@ -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"),
@@ -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
@@ -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

0 comments on commit ff96af6

Please sign in to comment.