Sha256: e50d17ee8dd35365bfe48abb0b1929840a846f855dcb6558180ae59723cc4da6

Contents?: true

Size: 754 Bytes

Versions: 10

Compression:

Stored size: 754 Bytes

Contents

require '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

10 entries across 10 versions & 1 rubygems

Version Path
rentjuicer-0.8.0 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.7.3 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.7.2 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.7.1 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.6.3 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.6.2 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.6.1 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.6.0 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.5.1 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.5.0 spec/rentjuicer/neighborhoods_spec.rb