Sha256: 740d0e0c4d3d3ba85d703a484fc950161376edb5537f82f007a34942750163ad

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

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

3 entries across 3 versions & 1 rubygems

Version Path
schoolfinder-0.2.1 spec/schoolfinder/error_spec.rb
schoolfinder-0.2.0 spec/schoolfinder/error_spec.rb
schoolfinder-0.1.0 spec/schoolfinder/error_spec.rb