Sha256: 5e205e8d22164e806486ba90d0dc9aad087e03ae89d04ec13520cd3f2369ef5a

Contents?: true

Size: 715 Bytes

Versions: 8

Compression:

Stored size: 715 Bytes

Contents

require File.join(File.dirname(__FILE__), "spec_helper")

describe "The default routes" do
  
  before :each do
    Merb::Router.prepare {|r| r.default_routes}
  end
    
  it "should match /foo to the Foo controller and index action" do
    route_to("/foo").should have_route(:controller => "foo", :action => "index", :id => nil)
  end
  
  it "should match /foo/bar to the Foo controller and the bar action" do
    route_to("/foo/bar").should have_route(:controller => "foo", :action => "bar", :id => nil)
  end
  
  it "should match /foo/bar/12 to the Foo controller, the bar action, and id of 12" do
    route_to("/foo/bar/12").should have_route(:controller => "foo", :action => "bar", :id => "12")
  end
  
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
thorero-0.9.4.5 spec/public/router/default_spec.rb
merb-core-0.9.2 spec/public/router/default_spec.rb
merb-core-0.9.3 spec/public/router/default_spec.rb
merb-core-0.9.5 spec/public/router/default_spec.rb
merb-core-0.9.4 spec/public/router/default_spec.rb
merb-core-0.9.6 spec/public/router/default_spec.rb
merb-core-0.9.7 spec/public/router/default_spec.rb
thorero-core-0.9.4.6 spec/public/router/default_spec.rb