Skip to content

Instantly share code, notes, and snippets.

@mPanasiewicz
Created April 29, 2016 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mPanasiewicz/411f41d1fc9cc9f379a022c9d53ac7f3 to your computer and use it in GitHub Desktop.
Save mPanasiewicz/411f41d1fc9cc9f379a022c9d53ac7f3 to your computer and use it in GitHub Desktop.
let(:my_handler) { MyClassInitialization.new(some params) }
subject { my_handler.call }
shared_examples_for 'returns proper error message' do
expect(subject.status).to be_falsey
expect(subject.code).to equal(204)
expect(subject.payload).not_to be_empty
end
context 'invalid data' do
it_behaves_like 'returns proper error message'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment