Sha256: 56f1be0c54c1de1c6f7a2a019d990b508fef0d5f6083c31af309d6e644c596b4

Contents?: true

Size: 971 Bytes

Versions: 3

Compression:

Stored size: 971 Bytes

Contents

require 'helper'

class TestReal < Test::Unit::TestCase
  def setup
    super
    BrighterPlanet.metadata.refresh
    FakeWeb.clean_registry
    FakeWeb.allow_net_connect = true
    $old_fallback = BrighterPlanet::Metadata::FALLBACK
    silence_warnings { BrighterPlanet::Metadata.const_set 'FALLBACK', Hash.new([]) }
  end
  
  def teardown
    super
    silence_warnings { BrighterPlanet::Metadata.const_set 'FALLBACK', $old_fallback }
  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
  
  def test_color
    assert %w{ red blue }.include?(::BrighterPlanet.metadata.color)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
brighter_planet_metadata-0.0.4 test/test_real.rb
brighter_planet_metadata-0.0.3 test/test_real.rb
brighter_planet_metadata-0.0.2 test/test_real.rb