require'spec_helper'describeNotifydoincludeEmailSpec::HelpersincludeEmailSpec::Matchersbeforedo@project=FactoryGirl.create:project@commit=FactoryGirl.create:commit,project: @project@build=FactoryGirl.create:build,commit: @commitenddescribe'build success'dosubject{Notify.build_success_email(@build.id,'wow@example.com')}it'has the correct subject'doshouldhave_subject/Build success for/endit'contains name of project'doshouldhave_body_text/build successful/endenddescribe'build fail'dosubject{Notify.build_fail_email(@build.id,'wow@example.com')}it'has the correct subject'doshouldhave_subject/Build failed for/endit'contains name of project'doshouldhave_body_text/build failed/endendend