spec/unit/rack/validation/request_method_spec.rb in goliath-1.0.3 vs spec/unit/rack/validation/request_method_spec.rb in goliath-1.0.4

- old
+ new

@@ -4,12 +4,12 @@ describe Goliath::Rack::Validation::RequestMethod do before(:each) do @app_headers = {'Content-Type' => 'asdf'} @app_body = {'a' => 'b'} - @app = mock('app').as_null_object - @app.stub!(:call).and_return([200, @app_headers, @app_body]) + @app = double('app').as_null_object + @app.stub(:call).and_return([200, @app_headers, @app_body]) end it 'accepts an app' do lambda { Goliath::Rack::Validation::RequestMethod.new('my app') }.should_not raise_error end @@ -42,11 +42,11 @@ it 'accepts methods on initialize' do rm = Goliath::Rack::Validation::RequestMethod.new('my app', ['GET', 'DELETE', 'HEAD']) rm.methods.should == ['GET', 'DELETE', 'HEAD'] end - + it 'accepts string method on initialize' do rm = Goliath::Rack::Validation::RequestMethod.new('my app', 'GET') rm.methods.should == ['GET'] end -end \ No newline at end of file +end