Sha256: 1c711aea12973476652d5d7b3b4650aec24900c0f8ca31bd371541b229eeff80

Contents?: true

Size: 534 Bytes

Versions: 8

Compression:

Stored size: 534 Bytes

Contents

require 'spec_helper'

describe Rentjuicer::Error do
  
  before do
    @rentjuicer = new_rentjuicer
    @neighborhoods = Rentjuicer::Neighborhoods.new(@rentjuicer)
    mock_get(@neighborhoods.resource, 'error.json')
  end
  
  it "should not return an error" do
    lambda {
      @neighborhoods.find_all
    }.should_not raise_exception
  end
  
  it "should return an error" do
    lambda {
      @neighborhoods.find_all!
    }.should raise_exception(Rentjuicer::Error, "Rentjuicer Error: Invalid API key. (code: 1)")
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

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