Use ruby 2.x hash syntax
This commit is contained in:
@@ -27,8 +27,8 @@ describe Track do
|
||||
describe '#file=' do
|
||||
it 'builds a new related sound with the file' do
|
||||
sounds = double 'sounds association proxy'
|
||||
track.stub(:sounds => sounds)
|
||||
sounds.should_receive(:build).with({:file => file})
|
||||
track.stub(sounds: sounds)
|
||||
sounds.should_receive(:build).with({file: file})
|
||||
track.file = file
|
||||
end
|
||||
end
|
||||
@@ -65,8 +65,8 @@ describe Track do
|
||||
|
||||
describe '.latest' do
|
||||
it 'returns latest tracks in descending creation date order' do
|
||||
track1 = FactoryGirl.create(:track, :created_at => '2011-07-27 19:13:42')
|
||||
track2 = FactoryGirl.create(:track, :created_at => '2011-07-27 19:58:57')
|
||||
track1 = FactoryGirl.create(:track, created_at: '2011-07-27 19:13:42')
|
||||
track2 = FactoryGirl.create(:track, created_at: '2011-07-27 19:58:57')
|
||||
Track.latest.should == [track2, track1]
|
||||
end
|
||||
end
|
||||
|
@@ -12,8 +12,8 @@ describe User do
|
||||
it { should_not allow_mass_assignment_of :password_hash }
|
||||
|
||||
context 'when a user with the same email address already exists' do
|
||||
let(:old_user) { FactoryGirl.create(:user, :email => 'unique@example.net') }
|
||||
subject { FactoryGirl.build(:user, :email => old_user.email) }
|
||||
let(:old_user) { FactoryGirl.create(:user, email: 'unique@example.net') }
|
||||
subject { FactoryGirl.build(:user, email: old_user.email) }
|
||||
|
||||
it { should_not be_valid }
|
||||
|
||||
|
Reference in New Issue
Block a user