Sha256: 8b536ab9df0d5d9b33e3fae0cc1a5038e04b254611280f2d77fa681f7d25f2ef

Contents?: true

Size: 1.08 KB

Versions: 21

Compression:

Stored size: 1.08 KB

Contents

require 'dummy_spec_helper'

feature "Concertos", %q{
  In order to have an awesome musical pages 
  As an user having role_groups 'composers'
  I want to do something with concertos (According to role_groups)
} do

  background do
    Concerto.create!(:title => 'one')
    Concerto.create!(:title => 'two')

    @composer = Admin.create!(:name => 'composer', :role_groups => 'composers', :email => 'stanislaw@mail.ru')
    @musician = User.create! :name => 'musician', :role_groups => 'musicians', :email => 'editor@mail.ru'
  end

  scenario "Concerto index" do
    visit '/concertos'
    page.should have_content('one')
    page.should have_content('two')
  end

  scenario "Show concerto to composer" do
    visit '/login_user/composer'

    visit '/concertos/one' # using friendly id :)
    page.should have_content('one')
    visit '/concertos/two'
    page.should have_content('two')
  end

  scenario "Show concerto to musician" do
    visit '/login_user/musician'

    visit '/concertos/one' # using friendly id :)
    page.should have_content('one')
    #page.should have_content('two')
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/integration/user/concerto_spec.rb
cantango-0.9.4.6 spec/integration/user/concerto_spec.rb
cantango-0.9.4.5 spec/integration/user/concerto_spec.rb
cantango-0.9.4.3 spec/integration/user/concerto_spec.rb
cantango-0.9.4.2 spec/integration/user/concerto_spec.rb
cantango-0.9.4.1 spec/integration/user/concerto_spec.rb
cantango-0.9.4 spec/integration/user/concerto_spec.rb
cantango-0.9.3.2 spec/integration/user/concerto_spec.rb
cantango-0.8.9.5 spec/integration/user/concerto_spec.rb
cantango-0.8.9.4 spec/integration/user/concerto_spec.rb
cantango-0.8.9.3 spec/integration/user/concerto_spec.rb
cantango-0.8.9.2 spec/integration/user/concerto_spec.rb
cantango-0.8.9.1 spec/integration/user/concerto_spec.rb
cantango-0.8.9 spec/integration/user/concerto_spec.rb
cantango-0.8.8.1 spec/integration/user/concerto_spec.rb
cantango-0.8.8 spec/integration/user/concerto_spec.rb
cantango-0.8.7 spec/integration/user/concerto_spec.rb
cantango-0.8.6.2 spec/integration/user/concerto_spec.rb
cantango-0.8.6.1 spec/integration/user/concerto_spec.rb
cantango-0.8.6 spec/integration/user/concerto_spec.rb