Fully embrace Ruby 1.9 hash syntax

Didn't bother with files in db/, config/, or features/
This commit is contained in:
Robert Speicher 2012-08-10 18:07:50 -04:00
parent 1413c23c50
commit 7754189187
257 changed files with 1449 additions and 1449 deletions

View file

@ -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) }