Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dayvsonlima/aa2208bbf3f89ad8b11e to your computer and use it in GitHub Desktop.
Save dayvsonlima/aa2208bbf3f89ad8b11e to your computer and use it in GitHub Desktop.
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