Sha256: 2697c712624af04547d551649784569fcc44f0c0a43261d220bc304f609d608f

Contents?: true

Size: 411 Bytes

Versions: 4

Compression:

Stored size: 411 Bytes

Contents

require 'spec_helper'

RSpec.describe RDStation::ErrorHandler::Default do
  describe '#raise_error' do
    let(:errors) { [{ 'error_message' => 'Error Message' }] }
    let(:default_error) { described_class.new(errors) }

    it 'raises the received error' do
      expect do
        default_error.raise_error
      end.to raise_error(RDStation::Error::Default, errors.first['error_message'])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rdstation-ruby-client-1.2.1 spec/lib/rdstation/error_handler/default_spec.rb
rdstation-ruby-client-1.2.0 spec/lib/rdstation/error_handler/default_spec.rb
rdstation-ruby-client-1.1.0 spec/lib/rdstation/error_handler/default_spec.rb
rdstation-ruby-client-1.0.1 spec/lib/rdstation/error_handler/default_spec.rb