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
|
||||
|
Reference in New Issue
Block a user