Organize feature specs in sub directories

This commit is contained in:
Thibault Jouan 2015-05-01 11:18:41 +00:00
parent 10d4da2822
commit 737c6b03e4
5 changed files with 16 additions and 11 deletions

View File

@ -1,4 +1,4 @@
feature 'Playlists' do
feature 'Playlists CRUD' do
include UserIntegrationHelpers
background { sign_in }

View File

@ -1,4 +1,4 @@
feature 'Tracks' do
feature 'Tracks CRUD' do
include UserIntegrationHelpers
background { sign_in }
@ -22,13 +22,4 @@ feature 'Tracks' do
expect(current_path).to eq track_path Track.first
expect(page).to have_content 'Mega song'
end
scenario 'plays track' do
track = FactoryGirl.create(:track_with_sound)
visit track_path(track)
expect(page).to have_xpath "//audio[@src='#{sound_path track.sound}']"
visit find('audio')[:src]
end
end

View File

@ -0,0 +1,14 @@
feature 'Tracks player' do
include UserIntegrationHelpers
background { sign_in }
scenario 'includes a player in track page' do
track = FactoryGirl.create(:track_with_sound)
visit track_path(track)
expect(page).to have_xpath "//audio[@src='#{sound_path track.sound}']"
visit find('audio')[:src]
end
end