spec/controller/actions_spec.rb in happy-0.1.0.pre19 vs spec/controller/actions_spec.rb in happy-0.1.0.pre20

- old
+ new

@@ -26,11 +26,11 @@ response_for { get '/with_status' }.status.should == 401 end it "uses the layout provided through the :layout option" do instance = Controller.new - instance.send(:context).should_receive(:render).with('layout.erb') + instance.should_receive(:render).with('layout.erb') catch(:done) { instance.serve! "content", :layout => 'layout.erb' } end it "sets extra options as response headers" do @@ -136,16 +136,16 @@ end end describe '#header' do it "sets the specified header in the response" do - subject.send(:context).response.should_receive(:[]=).with('Content-type', 'text/css') + subject.send(:response).should_receive(:[]=).with('Content-type', 'text/css') subject.header 'Content-type', 'text/css' end it "also accepts the header name as a symbol" do - subject.send(:context).response.should_receive(:[]=).with('Content-type', 'text/css') + subject.send(:response).should_receive(:[]=).with('Content-type', 'text/css') subject.header :content_type, 'text/css' end end describe '#content_type' do @@ -155,10 +155,10 @@ end end describe '#layout' do it "sets the layout to be used by the current context" do - subject.send(:context).should_receive(:layout=).with('layout.erb') + subject.send(:response).should_receive(:layout=).with('layout.erb') subject.layout 'layout.erb' end end end end