Sha256: f03816421f409be1b8ca1c0631baf68f4004e2e9feb4f38e82f57670157a3231

Contents?: true

Size: 552 Bytes

Versions: 10

Compression:

Stored size: 552 Bytes

Contents

require 'spec_helper'

describe Restfulness::HTTPException do

  describe "#initialize" do
    it "should assign variables" do
      obj = Restfulness::HTTPException.new(200, "payload", :message => 'foo', :headers => {})
      obj.status.should eql(200)
      obj.payload.should eql("payload")
      obj.message.should eql('foo')
      obj.headers.should eql({})
    end

    it "should use status status for message if none provided" do
      obj = Restfulness::HTTPException.new(200, "payload")
      obj.message.should eql('OK')
    end
  end


end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
restfulness-0.3.2 spec/unit/exceptions_spec.rb
restfulness-0.3.1 spec/unit/exceptions_spec.rb
restfulness-0.3.0 spec/unit/exceptions_spec.rb
restfulness-0.2.6 spec/unit/exceptions_spec.rb
restfulness-0.2.5 spec/unit/exceptions_spec.rb
restfulness-0.2.4 spec/unit/exceptions_spec.rb
restfulness-0.2.3 spec/unit/exceptions_spec.rb
restfulness-0.2.2 spec/unit/exceptions_spec.rb
restfulness-0.2.1 spec/unit/exceptions_spec.rb
restfulness-0.2.0 spec/unit/exceptions_spec.rb