Sha256: b644934ee41187f609c21b78336881c06ce7cdc4390bfbd0744917a849cfa671

Contents?: true

Size: 745 Bytes

Versions: 4

Compression:

Stored size: 745 Bytes

Contents

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

describe "A route marked as fixatable" do
  predicate_matchers[:allow_fixation] = :allow_fixation?

  it "allows fixation" do
    Merb::Router.prepare do |r|
      r.match("/hello/:action/:id").to(:controller => "foo", :action => "fixoid").fixatable
    end

    matched_route_for("/hello/goodbye/tagging").should allow_fixation
  end
end



describe "A route NOT marked as fixatable" do
  predicate_matchers[:allow_fixation] = :allow_fixation?

  it "DOES NOT allow fixation" do
    Merb::Router.prepare do |r|
      r.match("/hello/:action/:id").to(:controller => "foo", :action => "fixoid")
    end

    matched_route_for("/hello/goodbye/tagging").should_not allow_fixation
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
thorero-0.9.4.5 spec/public/router/fixation_spec.rb
merb-core-0.9.5 spec/public/router/fixation_spec.rb
merb-core-0.9.4 spec/public/router/fixation_spec.rb
thorero-core-0.9.4.6 spec/public/router/fixation_spec.rb