hassox (owner)

Revisions

gist: 181697 Download_button fork
public
Public Clone URL: git://gist.github.com/181697.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
  it "should generate an inherited route" do
    FooApp.router do |r|
      r.add("/simple").name(:simple)
      r.mount(INNER_APP, "/foo(/:stuff)").name(:stuff)
    end
    
    class ::BarApp < FooApp; end
    
    Pancake.url(BarApp, :simple).should == "/simple"
    Pancake.url(BarApp, :stuff => "this_stuff").should == "/foo/this_stuff"
    Pancake.url(BarApp, :stuff, :stuff => "that_stuff").should == "/foo/that_stuff"
  end