Sha256: 41b0c6d150d4c115dcdb8de468d096f3a3efa2ed39c8ad1912ccfca966e0afb0

Contents?: true

Size: 404 Bytes

Versions: 18

Compression:

Stored size: 404 Bytes

Contents

require "spec_helper"

class MockResponse
  def code
    10000
  end
  
  def body
    " error description"
  end
end

describe PagSeguro::Errors::UnknownError do
  it "should be able to raise an unknown error" do
    lambda { raise PagSeguro::Errors::UnknownError.new(MockResponse.new) }.should raise_error(PagSeguro::Errors::UnknownError, "Unknown response code (10000):\n error description")
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pag_seguro-0.5.3 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.5.2 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.5.1 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.4.1 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.4.0 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.3.2 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.3.1 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.3.0 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.2.3 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.2.2 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.2.1 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.2.0 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.1.9 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.1.8 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.1.7 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.1.6 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.1.4 spec/pag_seguro/errors/unknown_error_spec.rb
pag_seguro-0.1.3 spec/pag_seguro/errors/unknown_error_spec.rb