Changeset 1109

Show
Ignore:
Timestamp:
12/14/07 11:54:43 (1 year ago)
Author:
dudl..@misnomer.us
Message:

Fix specs to work whether parameterized actions are enabled or not

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/spec/merb/controller_spec.rb

    r1102 r1109  
    1414    c._layout.should == :application 
    1515  end 
    16    
     16 
    1717  it "should have a spec helper to dispatch that skips the router" do 
    1818    Merb::Router.should_not_receive(:match) 
    1919    dispatch_to(Bar, :foo, :id => "1") do |controller| 
    20       controller.should_receive(:foo).with("1") 
     20      if defined? ParseTreeArray # We have parameterized actions 
     21        controller.should_receive(:foo).with("1") 
     22      else 
     23        controller.should_receive(:foo) # No parameterized actions 
     24        controller.params[:id].should == "1" 
     25      end 
    2126    end 
    2227  end