Sha256: 9f338f7bf3e868f9fef94991e50349ea2c5b7509f45c26645783bbe862696254

Contents?: true

Size: 464 Bytes

Versions: 6

Compression:

Stored size: 464 Bytes

Contents

require 'spec_helper'

describe Resttestrail::TestrailError do
  it "raises the exception with the correct data" do
    message = "Amazing Error"
    hash_object = {:success => false, :body => "body", :error => "error"}
    expect { raise Resttestrail::TestrailError.new(hash_object), message }.to raise_error { |e|
      expect(e).to be_a(Resttestrail::TestrailError)
      expect(e.message).to eq message
      expect(e.object).to eq hash_object
    }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
resttestrail-0.1.1 spec/lib/resttestrail/testrailerror_spec.rb
resttestrail-0.1.0 spec/lib/resttestrail/testrailerror_spec.rb
resttestrail-0.0.5 spec/lib/resttestrail/testrailerror_spec.rb
resttestrail-0.0.4 spec/lib/resttestrail/testrailerror_spec.rb
resttestrail-0.0.3 spec/lib/resttestrail/testrailerror_spec.rb
resttestrail-0.0.2 spec/lib/resttestrail/testrailerror_spec.rb