Sha256: 0c125deb205c096b2613ce0a7187606faa9abc45bf7914eb56785e95314cfa71

Contents?: true

Size: 649 Bytes

Versions: 3

Compression:

Stored size: 649 Bytes

Contents

require "lanes/spec_helper"

describe Lanes::Configuration do

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

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lanes-0.1.2 spec/configuration_spec.rb
lanes-0.1.0 spec/configuration_spec.rb
lanes-0.0.8 spec/configuration_spec.rb