Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/generators/rspec/integration/templates/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
describe "GET /<%= table_name %>" do
it "works! (now write some real specs)" do
<% if webrat? -%>
visit <%= table_name %>_path
visit <%= index_helper %>_path
<% else -%>
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
get <%= table_name %>_path
get <%= index_helper %>_path
<% end -%>
response.status.should be(200)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/rspec/scaffold/templates/controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def <%= mock_file_name %>(stubs={})
it "redirects to the <%= table_name %> list" do
<%= stub orm_class.find(class_name) %> { <%= mock_file_name %> }
delete :destroy, :id => "1"
response.should redirect_to(<%= table_name %>_url)
response.should redirect_to(<%= index_helper %>_url)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/rspec/scaffold/templates/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end
<% else -%>
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form", :action => <%= file_name %>_path(@<%= file_name %>), :method => "post" do
assert_select "form", :action => <%= index_helper %>_path(@<%= file_name %>), :method => "post" do
<% for attribute in output_attributes -%>
assert_select "<%= attribute.input_type -%>#<%= file_name %>_<%= attribute.name %>", :name => "<%= file_name %>[<%= attribute.name %>]"
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/rspec/scaffold/templates/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
end
<% else -%>
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form", :action => <%= table_name %>_path, :method => "post" do
assert_select "form", :action => <%= index_helper %>_path, :method => "post" do
<% for attribute in output_attributes -%>
assert_select "<%= attribute.input_type -%>#<%= file_name %>_<%= attribute.name %>", :name => "<%= file_name %>[<%= attribute.name %>]"
<% end -%>
Expand Down