require 'spec_helper' describe Notifier do let!(:user) {make_user} let!(:aspect) {user.aspects.create(:name => "science")} let!(:person) {Factory.create :person} let!(:request_mail) {Notifier.new_request(user.id, person.id)} let!(:request_accepted_mail) {Notifier.request_accepted(user.id, person.id, aspect.id)} describe "#new_request" do it 'goes to the right person' do request_mail.to.should == [user.email] end it 'has the receivers name in the body' do request_mail.body.encoded.include?(user.person.profile.first_name).should be true end it 'has the name of person sending the request' do request_mail.body.encoded.include?(person.name).should be true end it 'has the css' do request_mail.body.encoded.include?("