Sha256: d985f5974e28547dab8b6b0761f30f022e94ee1b3ba4e721d9fd4cae72228b38

Contents?: true

Size: 1.04 KB

Versions: 15

Compression:

Stored size: 1.04 KB

Contents

require 'helper'

class TestFallback < Test::Unit::TestCase
  def setup
    super
    FakeWeb.clean_registry
    FakeWeb.allow_net_connect = false
    [
      'http://data.brighterplanet.com/datasets.json',
      'http://carbon.brighterplanet.com/emitters.json',
      'http://certified.carbon.brighterplanet.com/emitters.json',
      'http://data.brighterplanet.com/resources.json',
      'http://carbon.brighterplanet.com/protocols.json',
    ].each do |url|
      FakeWeb.register_uri  :get,
                            url,
                            :status => ["500", "Urg"],
                            :body => nil
    end
  end

  def test_emitters
    assert ::BrighterPlanet.metadata.emitters.include? 'AutomobileTrip'
  end
    
  def test_resources
    assert ::BrighterPlanet.metadata.resources.include? 'AutomobileMake'
  end
  
  def test_datasets
    assert ::BrighterPlanet.metadata.datasets.include? 'AutomobileIndustry'
  end
  
  def test_protocols
    assert ::BrighterPlanet.metadata.protocols.values.include? 'The Climate Registry'
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
brighter_planet_metadata-0.0.16 test/test_fallback.rb
brighter_planet_metadata-0.0.15 test/test_fallback.rb
brighter_planet_metadata-0.0.14 test/test_fallback.rb
brighter_planet_metadata-0.0.13 test/test_fallback.rb
brighter_planet_metadata-0.0.12 test/test_fallback.rb
brighter_planet_metadata-0.0.11 test/test_fallback.rb
brighter_planet_metadata-0.0.10 test/test_fallback.rb
brighter_planet_metadata-0.0.9 test/test_fallback.rb
brighter_planet_metadata-0.0.8 test/test_fallback.rb
brighter_planet_metadata-0.0.7 test/test_fallback.rb
brighter_planet_metadata-0.0.6 test/test_fallback.rb
brighter_planet_metadata-0.0.5 test/test_fallback.rb
brighter_planet_metadata-0.0.4 test/test_fallback.rb
brighter_planet_metadata-0.0.3 test/test_fallback.rb
brighter_planet_metadata-0.0.2 test/test_fallback.rb