Replace cucumber features by rails integration specs

This commit is contained in:
Thibault Jouan
2011-09-13 23:47:59 +00:00
parent 638d379ec6
commit 639293e4ca
26 changed files with 170 additions and 615 deletions

View File

@@ -0,0 +1,32 @@
require 'spec_helper'
feature 'Home page' do
include UserIntegrationHelpers
background do
sign_in
end
scenario 'displays playlists' do
playlist = Factory.create(:playlist, :name => 'Electro')
visit root_path
page.should have_content('Electro')
end
scenario 'displays last track added' do
Factory.create(:track,
:name => 'Mega song 1',
:created_at => '2011-07-27 19:13:42'
)
Factory.create(:track,
:name => 'Mega song 2',
:created_at => '2011-07-27 19:58:57'
)
visit root_path
page.body.should match(/Mega song 2.+Mega song 1/m)
end
end