diff --git a/spec/controllers/bookmarks_controller_spec.rb b/spec/controllers/bookmarks_controller_spec.rb index 37183c34b..ba62b588c 100644 --- a/spec/controllers/bookmarks_controller_spec.rb +++ b/spec/controllers/bookmarks_controller_spec.rb @@ -3,13 +3,13 @@ require File.dirname(__FILE__) + '/../spec_helper' describe BookmarksController do before do #TODO(dan) Mocking Warden; this is a temp fix - request.env['warden'] = mock_model(Warden, :authenticate => @user, :authenticate! => @user) - @bob = Factory.create(:user) + request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user) + @bob = Factory.build(:user) @bookmark = Factory.build(:bookmark) - @bookmark.save #TODO figure out why validations are not working + @bob.save + @bookmark.save end - render_views it "index action should render index template" do diff --git a/spec/controllers/friends_controller_spec.rb b/spec/controllers/friends_controller_spec.rb index 7f6fe491a..4abbbede7 100644 --- a/spec/controllers/friends_controller_spec.rb +++ b/spec/controllers/friends_controller_spec.rb @@ -4,7 +4,7 @@ describe FriendsController do render_views before do #TODO(dan) Mocking Warden; this is a temp fix - request.env['warden'] = mock_model(Warden, :authenticate => @user, :authenticate! => @user) + request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user) @friend = Factory.build(:friend) end @@ -15,7 +15,6 @@ describe FriendsController do it "show action should render show template" do @friend.save - request.env['warden'].should_receive(:authenticate?).at_least(:once) get :show, :id => @friend.id response.should render_template(:show) end diff --git a/spec/controllers/status_messages_controller_spec.rb b/spec/controllers/status_messages_controller_spec.rb index 22d080fe0..3468b9d36 100644 --- a/spec/controllers/status_messages_controller_spec.rb +++ b/spec/controllers/status_messages_controller_spec.rb @@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../spec_helper' describe StatusMessagesController do before do #TODO(dan) Mocking Warden; this is a temp fix - request.env['warden'] = mock_model(Warden, :authenticate => @user, :authenticate! => @user) + request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user) @bob = Factory.build(:user,:email => "bob@aol.com", :password => "secret") @status_message = Factory.build(:status_message, :message => "yodels.") @bob.save @@ -43,7 +43,6 @@ describe StatusMessagesController do end it "show action should render show template" do - request.env['warden'].should_receive(:authenticate?).at_least(:once) get :show, :id => @status_message.id response.should render_template(:show) end