Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Don't test Rails #51

Closed
wants to merge 1 commit into from

2 participants

Gabe Berke-Williams Matt Jankowski
Gabe Berke-Williams
Admin
  • Testing both page_path("one") and page_path(:id => "one") is unnecessary
Gabe Berke-Williams gabebw Don't test Rails
* Testing both `page_path("one")` and `page_path(:id => "one")` is unnecessary
b578c76
Matt Jankowski
Admin

Because of what we do with *id I think these are necessary. Specifically, I feel like we added these only in response to something breaking with how we previously created the route.

Gabe Berke-Williams
Admin

OK, I'll close this then.

Gabe Berke-Williams gabebw closed this
Damian Galarza dgalarza deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 26, 2012
  1. Gabe Berke-Williams

    Don't test Rails

    gabebw authored
    * Testing both `page_path("one")` and `page_path(:id => "one")` is unnecessary
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 12 deletions.
  1. +5 −12 spec/routing/routes_spec.rb
17 spec/routing/routes_spec.rb
View
@@ -1,16 +1,13 @@
require 'spec_helper'
+
describe 'routes' do
context "using default configuration" do
- it "should generate normal resource route with id" do
- page_path(:id => "one").should == "/pages/one"
- end
-
- it "should generate normal resource route with string" do
+ it "should generate normal resource route" do
page_path("one").should == "/pages/one"
end
- it "should generate nested route with string" do
+ it "should generate nested route" do
page_path("one/two").should == "/pages/one/two"
end
@@ -40,15 +37,11 @@
Rails.application.reload_routes!
end
- it "should generate normal resource route with id" do
- page_path(:id => "one").should == "/other_pages/one"
- end
-
- it "should generate normal resource route with string" do
+ it "should generate normal resource route" do
page_path("one").should == "/other_pages/one"
end
- it "should generate nested route with string" do
+ it "should generate nested route" do
page_path("one/two").should == "/other_pages/one/two"
end
Something went wrong with that request. Please try again.