[issue #37] Moved shared examples to main file.

This commit is contained in:
George Vinogradov 2011-12-15 02:04:05 +04:00
parent 9510318937
commit c118e69769
2 changed files with 15 additions and 13 deletions

View File

@ -1,6 +1,21 @@
require 'spec_helper'
describe BuildListsController do
shared_examples_for 'show build list' do
it 'should be able to perform show action' do
get :show, @show_params
response.should be_success
end
end
shared_examples_for 'not show build list' do
it 'should not be able to perform show action' do
get :show, @show_params
response.should redirect_to(forbidden_url)
end
end
context 'crud' do
context 'for guest' do
it 'should not be able to perform all action' do

View File

@ -1,13 +0,0 @@
shared_examples_for 'show build list' do
it 'should be able to perform show action' do
get :show, @show_params
response.should be_success
end
end
shared_examples_for 'not show build list' do
it 'should not be able to perform show action' do
get :show, @show_params
response.should redirect_to(forbidden_url)
end
end