Skip to content

Commit

Permalink
Fixing content route plurization. Found a way to test pending Rails 3…
Browse files Browse the repository at this point in the history
… RC [concerto#89 state:resolved]
  • Loading branch information
bamnet committed Jun 8, 2010
1 parent 0b73741 commit 9934b19
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# feeds.resources :submissions
#end

resources :contents, :as => "content"
resources :contents, :path => "content"

# The priority is based upon order of creation:
# first created -> highest priority.
Expand Down
16 changes: 16 additions & 0 deletions test/integration/routes_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require 'test_helper'

class RoutesTest < ActionController::IntegrationTest
fixtures :all

test "non plural content route" do
# I believe we should be able to test the route like follows
# in > Rails 3beta3. Looks like the bug was closed a few weeks ago
# https://rails.lighthouseapp.com/projects/8994/tickets/4390-patch-assert_recognizes-should-work-in-integration-tests
# assert_recognizes contents_url, "content"

#Until then, we'll use this guy
assert_equal "/content", contents_path

end
end

0 comments on commit 9934b19

Please sign in to comment.