spec/controller/actions_spec.rb in happy-0.1.0.pre21 vs spec/controller/actions_spec.rb in happy-0.1.0.pre22

- old
+ new

@@ -5,14 +5,14 @@ subject { Controller.new } describe '#serve!' do def app build_controller do - path('simple') { serve! "Simple response" } - path('with_headers') { serve! "body { color: red }", :content_type => 'text/css' } - path('with_status') { serve! "Not Allowed", :status => 401 } - path('with_layout') { serve! "content", :layout => 'layout.erb' } + path?('simple') { serve! "Simple response" } + path?('with_headers') { serve! "body { color: red }", :content_type => 'text/css' } + path?('with_status') { serve! "Not Allowed", :status => 401 } + path?('with_layout') { serve! "content", :layout => 'layout.erb' } end end it "serves the provided string as the response body" do response_for { get '/simple' }.body.should == 'Simple response' @@ -43,11 +43,11 @@ it "doesn't do anything if the current path does not match the request path" do def app Happy.route do serve! "This should not render" - path 'test' do + path? 'test' do serve! "But this should render" end end end @@ -78,10 +78,10 @@ it "doesn't do anything if the current path does not match the request path" do def app Happy.route do redirect! "http://mans.de" - path 'test' do + path? 'test' do redirect! "http://schnitzelpress.org" end end end