spec/errors_spec.rb in mrkt-1.2.0 vs spec/errors_spec.rb in mrkt-1.2.1

- old
+ new

@@ -1,21 +1,19 @@ describe Mrkt::Errors do describe '.find_by_response_code' do - subject { described_class.find_by_response_code(code) } + subject(:actual) { described_class.find_by_response_code(code) } - context 'when the code is' do - context 'known' do - let(:code) { 413 } + context 'when the code is known' do + let(:code) { 413 } - it 'should return the mapped error class' do - is_expected.to eq(Mrkt::Errors::RequestEntityTooLarge) - end + it 'returns the mapped error class' do + expect(actual).to eq(Mrkt::Errors::RequestEntityTooLarge) end + end - context 'unknown' do - let(:code) { 7331 } + context 'when the code is unknown' do + let(:code) { 7331 } - it { is_expected.to eq(Mrkt::Errors::Error) } - end + it { is_expected.to eq(Mrkt::Errors::Error) } end end end