Sha256: 0b8129d8167bd37ab86bd721ddd93b9250a352833257a762c383e78597d2969b

Contents?: true

Size: 736 Bytes

Versions: 3

Compression:

Stored size: 736 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

3 entries across 3 versions & 1 rubygems

Version Path
rentjuicer-0.10.1 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.10.0 spec/rentjuicer/neighborhoods_spec.rb
rentjuicer-0.9.0 spec/rentjuicer/neighborhoods_spec.rb