Sha256: 423abcd5011e1c6c50f15ca6aa7a328154e9a71ef42595dfec312c60a59e4636

Contents?: true

Size: 1.58 KB

Versions: 5

Compression:

Stored size: 1.58 KB

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, through score' do
      xml = File.read(File.expand_path(
        File.join(File.dirname(__FILE__), '..', 'fixtures', 'school_test_scores.xml')
      ))
      FakeWeb.register_uri(:get, 'http://api.greatschools.org/school/tests/AZ/1?key=0123456789ABCDEF', body: xml)

      score = GreatSchools::Score.for_school('AZ', 1)
      rank = score.rank

      rank.name.should eql('AZ GS Rating')
      rank.scale.should eql('1-10')
      rank.year.should eql('2008')
      rank.score.should eql('9.0')
      rank.description.should eql(<<-TEXT.squish)
        GreatSchools Ratings for Arizona are based on the 2007-2008 Arizona's
        Instrument to Measure Standards (AIMS) reading, writing and math results.
        GreatSchools compared the test results for each grade and subject across
        all Arizona schools and divided them into 1 through 10 ratings (10 is
        the best). Please note, private schools are not required to release test
        results, so ratings are available only for public schools. GreatSchools
        Ratings cannot be compared across states, because of differences in the
        states' standardized testing programs. Keep in mind that when comparing
        schools using GreatSchools Ratings it's important to factor in other
        information, including the quality of each school's teachers, the school
        culture, special programs, etc.
      TEXT
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
great_schools-0.2.1 spec/great_schools/rank_spec.rb
great_schools-0.2.0 spec/great_schools/rank_spec.rb
great_schools-0.1.2 spec/great_schools/rank_spec.rb
great_schools-0.1.1 spec/great_schools/rank_spec.rb
great_schools-0.1.0 spec/great_schools/rank_spec.rb