spec/castronaut/adapters/development/user_spec.rb in relevance-castronaut-0.6.1 vs spec/castronaut/adapters/development/user_spec.rb in relevance-castronaut-0.7.4

- old
+ new

@@ -30,21 +30,21 @@ describe "when the user is not found" do it "returns a Castronaut::AuthenticationResult object with the unable to authenticate user message" do Castronaut::Adapters::Development::User.stub!(:find_by_login).and_return(nil) - Castronaut::Adapters::Development::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate the username bob" + Castronaut::Adapters::Development::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate" end end describe "when the user is found" do describe "when the credentials are invalid" do it "returns a Castronaut::AuthenticationResult object with the unable to authenticate user message" do - Castronaut::Adapters::Development::User.stub!(:find_by_login).and_return(stub_everything(:crypted_password => "a", :salt => "b")) - Castronaut::Adapters::Development::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate the username bob" + Castronaut::Adapters::Development::User.stub!(:find_by_login).and_return(stub(:crypted_password => "a", :salt => "b").as_null_object) + Castronaut::Adapters::Development::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate" end end end