spec/unit/rack/formatters/xml_spec.rb in goliath-1.0.3 vs spec/unit/rack/formatters/xml_spec.rb in goliath-1.0.4

- old
+ new

@@ -7,11 +7,11 @@ lambda { Goliath::Rack::Formatters::XML.new('my app') }.should_not raise_error end describe 'with a formatter' do before(:each) do - @app = mock('app').as_null_object + @app = double('app').as_null_object @xml = Goliath::Rack::Formatters::XML.new(@app) end it 'checks content type for application/xml' do @xml.xml_response?({'Content-Type' => 'application/xml'}).should be_true @@ -20,10 +20,10 @@ it 'returns false for non-applicaton/xml types' do @xml.xml_response?({'Content-Type' => 'application/json'}).should be_false end it 'calls the app with the provided environment' do - env_mock = mock('env').as_null_object + env_mock = double('env').as_null_object @app.should_receive(:call).with(env_mock).and_return([200, {}, {"a" => 1}]) @xml.call(env_mock) end it 'formats the body into xml if content-type is xml' do