Skip to content

Commit

Permalink
Added test case that doesn't work right now
Browse files Browse the repository at this point in the history
  • Loading branch information
levraipixel committed Feb 18, 2012
1 parent fad7e22 commit 582623a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/js_routes_spec.rb
Expand Up @@ -193,6 +193,12 @@
end

context "using optional path fragments" do
context "including not optional parts" do
it "should include everything that is not optional" do
evaljs("Routes.foo_path()").should == "/other_optional"
end
end

context "but not including them" do
it "should not include the optional parts" do
evaljs("Routes.things_path()").should == routes.things_path
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -42,6 +42,8 @@ class App < Rails::Application
scope "(/optional/:optional_id)" do
resources :things
end

match "/other_optional/(:optional_id)" => "foo#foo", :as => :foo
end

end
Expand Down

0 comments on commit 582623a

Please sign in to comment.