diff --git a/spec/helpers/notifications_helper_spec.rb b/spec/helpers/notifications_helper_spec.rb index b233246ab..5c3c7e1a2 100644 --- a/spec/helpers/notifications_helper_spec.rb +++ b/spec/helpers/notifications_helper_spec.rb @@ -3,12 +3,10 @@ require 'rails_helper' describe NotificationsHelper do describe "reply_link" do - before(:each) do - @member = FactoryGirl.create(:member) - end + let(:member) { FactoryGirl.create(:member) } it "replies to PMs with PMs" do - notification = FactoryGirl.create(:notification, :recipient_id => @member.id, :post_id => nil) + notification = FactoryGirl.create(:notification, :recipient_id => member.id, :post_id => nil) subject = "Re: " + notification.subject link = helper.reply_link(notification) @@ -17,7 +15,7 @@ describe NotificationsHelper do end it "replies to post comments with post comments" do - notification = FactoryGirl.create(:notification, :recipient_id => @member.id) + notification = FactoryGirl.create(:notification, :recipient_id => member.id) link = helper.reply_link(notification) link.should_not be_nil