spec/lib/rev/api_spec.rb in rev-api-2.2.0 vs spec/lib/rev/api_spec.rb in rev-api-2.2.1

- old
+ new

@@ -1,24 +1,24 @@ -require_relative '../../spec_helper' - -describe 'API Client' do - let(:client) { Rev.new('welcome', 'AAAAAu/YjZ3phXU5FsF35yIcgiA=', 'www.revtrunk.com') } - - it 'must raise NotAuthorizedError on unauthorized HTTP response' do - VCR.insert_cassette 'unauthorized' - - unauthorized_client = Rev.new('welcome', 'trololo', Rev::Api::SANDBOX_HOST) - action = lambda { unauthorized_client.get_orders_page } - action.must_raise Rev::NotAuthorizedError - end - - it 'must raise NotFoundError on NotFound HTTP response' do - VCR.insert_cassette 'not_found_order' - - action = lambda { client.get_order('trololo') } - action.must_raise Rev::NotFoundError - end - - after do - VCR.eject_cassette - end -end +require_relative '../../spec_helper' + +describe 'API Client' do + let(:client) { Rev.new('welcome', 'AAAAAu/YjZ3phXU5FsF35yIcgiA=', 'www.revtrunk.com') } + + it 'must raise NotAuthorizedError on unauthorized HTTP response' do + VCR.insert_cassette 'unauthorized' + + unauthorized_client = Rev.new('welcome', 'trololo', Rev::Api::SANDBOX_HOST) + action = lambda { unauthorized_client.get_orders_page } + action.must_raise Rev::NotAuthorizedError + end + + it 'must raise NotFoundError on NotFound HTTP response' do + VCR.insert_cassette 'not_found_order' + + action = lambda { client.get_order('trololo') } + action.must_raise Rev::NotFoundError + end + + after do + VCR.eject_cassette + end +end