Sha256: 95e3c3ac07e12f6f4d7793fdfef36a9314347651f4708e9393c77d1b466aac79

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

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

3 entries across 3 versions & 1 rubygems

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