Sha256: 00a8d1c770a9161c4be2c064b86b0d4cf3d08151062b9f3e3b9721ab777bce1f

Contents?: true

Size: 706 Bytes

Versions: 21

Compression:

Stored size: 706 Bytes

Contents

# -*- coding: utf-8 -*-
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 }
  its(:status){ should == 200 }
  it{ subject.meta[:message].should == 'OK' }
  its(:message){ should == 'OK' }
  it{ subject.response[:hello].should == 'world' }
  its([:hello]){ should == 'world' }
end

Version data entries

21 entries across 18 versions & 1 rubygems

Version Path
mushikago-sdk-2.4.3 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.4.3 spec//mushikago/http/response_spec.rb
mushikago-sdk-2.4.2 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.4.2 spec//mushikago/http/response_spec.rb
mushikago-sdk-2.4.1 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.4 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.2 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.2 spec//mushikago/http/response_spec.rb
mushikago-sdk-2.1.1 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.1.0 spec/mushikago/http/response_spec.rb
mushikago-sdk-2.0.0 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.4.3 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.4.2 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.4.1 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.4.0 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.3.7 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.3.6 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.3.5 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.3.4 spec/mushikago/http/response_spec.rb
mushikago-sdk-0.3.2 spec/mushikago/http/response_spec.rb