Implement tracks/{show,listen}
This commit is contained in:
17
spec/controllers/tracks_controller_spec.rb
Normal file
17
spec/controllers/tracks_controller_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe TracksController do
|
||||
def valid_attributes
|
||||
{
|
||||
:name => 'Mega song'
|
||||
}
|
||||
end
|
||||
|
||||
describe 'GET show' do
|
||||
it 'assigns the requested track as @track' do
|
||||
track = Track.create! valid_attributes
|
||||
get :show, :id => track.id.to_s
|
||||
assigns[:track].should == track
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user