Sha256: 8bc70e390e2a8a7adb5fe9f8790026552fe1bc5511c56e0c1dcc9d5aa519097d

Contents?: true

Size: 801 Bytes

Versions: 8

Compression:

Stored size: 801 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Rentjuicer::Neighborhoods do
  
  before do
    @rentjuicer = new_rentjuicer
    @neighborhoods = Rentjuicer::Neighborhoods.new(@rentjuicer)
    mock_get(@neighborhoods.resource, 'neighborhoods.json')
  end
  
  context "find_all" do
    before do
      @response = @neighborhoods.find_all
    end
    
    it "should be a success" do
      @response.success?.should be_true
    end
    
    it "should return Rash for response for body" do
      @response.body.should be_kind_of(Hashie::Rash)
    end
    
    it "should set an array of neighborhoods on the body" do
      @response.body.neighborhoods.should be_kind_of(Array)
      @response.body.neighborhoods.first.should be_kind_of(Hashie::Rash)
    end
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rentjuicer-0.4.4 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.4.3 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.4.2 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.4.1 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.4.0 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.3.0 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.2.1 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.2.0 spec/rentjuicer/neighborhoods_spec.rb