diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:07:50 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-10 18:25:15 -0400 |
commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /spec/mailers | |
parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) | |
download | gitlab-ce-775418918782d5284000ed0bfea364458c748567.tar.gz |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 010f063a98d..27af1e381c8 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -4,7 +4,7 @@ describe Notify do include EmailSpec::Helpers include EmailSpec::Matchers - let(:recipient) { Factory.create(:user, :email => 'recipient@example.com') } + let(:recipient) { Factory.create(:user, email: 'recipient@example.com') } let(:project) { Factory.create(:project) } shared_examples 'a multiple recipients email' do @@ -15,7 +15,7 @@ describe Notify do describe 'for new users, the email' do let(:example_site_path) { root_path } - let(:new_user) { Factory.create(:user, :email => 'newguy@example.com') } + let(:new_user) { Factory.create(:user, email: 'newguy@example.com') } subject { Notify.new_user_email(new_user.id, new_user.password) } @@ -42,8 +42,8 @@ describe Notify do context 'for a project' do describe 'items that are assignable, the email' do - let(:assignee) { Factory.create(:user, :email => 'assignee@example.com') } - let(:previous_assignee) { Factory.create(:user, :name => 'Previous Assignee') } + let(:assignee) { Factory.create(:user, email: 'assignee@example.com') } + let(:previous_assignee) { Factory.create(:user, name: 'Previous Assignee') } shared_examples 'an assignee email' do it 'is sent to the assignee' do @@ -52,7 +52,7 @@ describe Notify do end context 'for issues' do - let(:issue) { Factory.create(:issue, :assignee => assignee, :project => project ) } + let(:issue) { Factory.create(:issue, assignee: assignee, project: project ) } describe 'that are new' do subject { Notify.new_issue_email(issue.id) } @@ -94,7 +94,7 @@ describe Notify do end context 'for merge requests' do - let(:merge_request) { Factory.create(:merge_request, :assignee => assignee, :project => project) } + let(:merge_request) { Factory.create(:merge_request, assignee: assignee, project: project) } describe 'that are new' do subject { Notify.new_merge_request_email(merge_request.id) } @@ -146,8 +146,8 @@ describe Notify do end context 'items that are noteable, the email for a note' do - let(:note_author) { Factory.create(:user, :name => 'author_name') } - let(:note) { Factory.create(:note, :project => project, :author => note_author) } + let(:note_author) { Factory.create(:user, name: 'author_name') } + let(:note) { Factory.create(:note, project: project, author: note_author) } before :each do Note.stub(:find).with(note.id).and_return(note) @@ -168,7 +168,7 @@ describe Notify do end describe 'on a project wall' do - let(:note_on_the_wall_path) { wall_project_path(project, :anchor => "note_#{note.id}") } + let(:note_on_the_wall_path) { wall_project_path(project, anchor: "note_#{note.id}") } subject { Notify.note_wall_email(recipient.id, note.id) } @@ -208,8 +208,8 @@ describe Notify do end describe 'on a merge request' do - let(:merge_request) { Factory.create(:merge_request, :project => project) } - let(:note_on_merge_request_path) { project_merge_request_path(project, merge_request, :anchor => "note_#{note.id}") } + let(:merge_request) { Factory.create(:merge_request, project: project) } + let(:note_on_merge_request_path) { project_merge_request_path(project, merge_request, anchor: "note_#{note.id}") } before(:each) { note.stub(:noteable).and_return(merge_request) } subject { Notify.note_merge_request_email(recipient.id, note.id) } @@ -226,8 +226,8 @@ describe Notify do end describe 'on an issue' do - let(:issue) { Factory.create(:issue, :project => project) } - let(:note_on_issue_path) { project_issue_path(project, issue, :anchor => "note_#{note.id}") } + let(:issue) { Factory.create(:issue, project: project) } + let(:note_on_issue_path) { project_issue_path(project, issue, anchor: "note_#{note.id}") } before(:each) { note.stub(:noteable).and_return(issue) } subject { Notify.note_issue_email(recipient.id, note.id) } |