Sha256: 7ea4382418247aa2dcf1d972b10a57a12d83276f3c107b9aaf028f6e93b2b8af
Contents?: true
Size: 738 Bytes
Versions: 1
Compression:
Stored size: 738 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) describe GreatSchools::Score do describe '#for_school' do it 'should populate score models from the returned XML' do xml = File.read(File.expand_path( File.join(File.dirname(__FILE__), '..', 'fixtures', 'school_test_scores.xml') )) FakeWeb.register_uri(:get, 'https://api.greatschools.org/school/tests/AZ/1?key=0123456789ABCDEF', body: xml) score = GreatSchools::Score.for_school('AZ', 1) expect(score.school_name).to eql('Flagstaff High School') expect(score.rank).to be_a(GreatSchools::Rank) score.tests.each do |test| expect(test).to be_a(GreatSchools::Test) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
great_schools-0.2.3 | spec/great_schools/score_spec.rb |