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

- old
+ new

@@ -1,11 +1,11 @@ require 'spec_helper' require 'goliath/rack/validation/param' describe Goliath::Rack::Validation::Param do before do - @app = mock('app').as_null_object + @app = double('app').as_null_object @env = {'params' => {}} end it "should not allow invalid options" do lambda { @@ -94,11 +94,11 @@ end context 'with middleware' do before(:each) do - @app = mock('app').as_null_object + @app = double('app').as_null_object @env = {'params' => {}} @rp = Goliath::Rack::Validation::Param.new(@app, {:type => 'Monkey', :key => 'mk', :message => 'is required'}) end @@ -177,11 +177,11 @@ end end context 'Nested keys tests' do before do - @app = mock('app').as_null_object + @app = double('app').as_null_object @env = {'params' => {}} @rp = Goliath::Rack::Validation::Param.new(@app, :type => 'Monkey', :key => ['data', 'credentials', 'login'], :message => 'is required') end @@ -209,10 +209,10 @@ end end context 'Nested keys tests (with string)' do before do - @app = mock('app').as_null_object + @app = double('app').as_null_object @env = {'params' => {}} @rp = Goliath::Rack::Validation::Param.new(@app, :type => 'Monkey', :key => 'data.credentials.login', :message => 'is required') end