[issue #37] Moved shared examples to main file.
This commit is contained in:
parent
9510318937
commit
c118e69769
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue