Forked from sergiosouzalima/new_test_desing_pattern.rb
Created
December 23, 2015 13:14
-
-
Save dayvsonlima/aa2208bbf3f89ad8b11e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.describe PagesController, type: :controller do | |
describe '#destroy' do | |
context 'when invalid scenario' do | |
context 'and resource is not found' do | |
# setup... | |
let() {...} | |
let() {...} | |
let() {...} | |
subject {} | |
# exercise.... | |
before do | |
end | |
it '...' do | |
# verify..... | |
expect(suject).to .... | |
end | |
it '...' do | |
# verify..... | |
expect(suject).to .... | |
end | |
# teardown.... | |
after do | |
... | |
end | |
end | |
end | |
context 'when valid scenario' do | |
context 'and resource is found' do | |
it '....' do | |
expect().to .... | |
end | |
end | |
end | |
end # #destroy | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment