Sha256: ef14b05f302769de855ec47c6a2c9bf7be42417d05f63083490dfea7462525c8

Contents?: true

Size: 697 Bytes

Versions: 5

Compression:

Stored size: 697 Bytes

Contents

require 'spec_helper'

describe Mushikago::Http::Response do
  before do
    response = {
      :meta => {
        :status => 200,
        :message => 'OK'
      },
      :response => {
        :hello => 'world'
      }
    }
    @response = Mushikago::Http::Response.new(response)
  end

  subject{ @response }

  it{ should respond_to(:meta, :response) }
  it{ should respond_to(:status, :message) }
  it{ should respond_to(:[]) }

  it{ subject.meta[:status].should == 200 }
  it{ subject.status.should == 200 }
  it{ subject.meta[:message].should == 'OK' }
  it{ subject.message.should == 'OK' }
  it{ subject.response[:hello].should == 'world' }
  it{ subject[:hello].should == 'world' }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mushikago-sdk-0.1.8 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.1.7 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.1.6 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.1.5 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.1.4 spec/mushikago/http/response_spec.rb