Sha256: 69ce12932e60f58f27a8282a4860d70c2d7bbdd092b38ed8cf8700b67cad883c

Contents?: true

Size: 471 Bytes

Versions: 5

Compression:

Stored size: 471 Bytes

Contents

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

describe "Schoolfinder::Error" do
  before do
    mock_get({"f" => "getTestScores", "nces_id" => "450231000564"}, 'failure.json')
    @schoolfinder = new_schoolfinder
  end

  it "should return an error" do
    lambda {
      @response = @schoolfinder.test_scores(:nces_id => "450231000564")
    }.should raise_exception(Schoolfinder::Error, "Schoolfinder Error: invalid api key (code: 3)")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
schoolfinder-0.4.3 spec/schoolfinder/error_spec.rb
schoolfinder-0.4.2 spec/schoolfinder/error_spec.rb
schoolfinder-0.4.1 spec/schoolfinder/error_spec.rb
schoolfinder-0.4.0 spec/schoolfinder/error_spec.rb
schoolfinder-0.3.1 spec/schoolfinder/error_spec.rb