Sha256: 4b6eb3da9e08ded6feb08ab60de590e8e3398aa69a45e882c105dba72a298f49

Contents?: true

Size: 653 Bytes

Versions: 9

Compression:

Stored size: 653 Bytes

Contents

require_relative "spec_helper"

describe Hippo::Configuration do

    def test_changing_values_are_logged
        begin
            assert_logs_matching( /environment changed from / ) do
                Hippo.config.environment='foo'
            end
        ensure
            Hippo.silence_logs {   Hippo.config.environment='foo' }
        end
    end

    def test_callbacks_are_fired
        sentinel = false
        Hippo.config.on_change(:environment) do |nv,ov|
            sentinel = nv
        end
        Hippo.silence_logs do
            Hippo.config.environment = :testing
            assert_equal sentinel, :testing
        end
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hippo-fw-0.9.9 spec/server/configuration_spec.rb
hippo-fw-0.9.8 spec/server/configuration_spec.rb
hippo-fw-0.9.7 spec/server/configuration_spec.rb
hippo-fw-0.9.6 spec/server/configuration_spec.rb
hippo-fw-0.9.5 spec/server/configuration_spec.rb
hippo-fw-0.9.4 spec/server/configuration_spec.rb
hippo-fw-0.9.3 spec/server/configuration_spec.rb
hippo-fw-0.9.2 spec/server/configuration_spec.rb
hippo-fw-0.9.1 spec/server/configuration_spec.rb