Sha256: 98824f20f1b2c3c3e0c04783f8342d49997f36f60d460cca142ee78ca7f3c29e

Contents?: true

Size: 819 Bytes

Versions: 3

Compression:

Stored size: 819 Bytes

Contents

require 'spec_helper'

describe Barometer do
  describe ".config" do
    around do |example|
      cached_config = Barometer.config
      example.run
      Barometer.config = cached_config
    end

    it "has a default value" do
      expect( Barometer.config ).to eq({ 1 => {wunderground: {version: :v1}} })
    end

    it "sets the value" do
      Barometer.config = { 1 => [:yahoo] }
      expect( Barometer.config ).to eq({ 1 => [:yahoo] })
    end
  end

  describe ".timeout" do
    around do |example|
      cached_timeout = Barometer.timeout
      example.run
      Barometer.timeout = cached_timeout
    end

    it "has a default value" do
      expect( Barometer.timeout ).to eq 15
    end

    it "sets the value" do
      Barometer.timeout = 5
      expect( Barometer.timeout ).to eq 5
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
barometer-0.9.7 spec/barometer_spec.rb
barometer-0.9.6 spec/barometer_spec.rb
barometer-0.9.5 spec/barometer_spec.rb