Sha256: 66464841281b058a1201f77ce844f52946662954625dfedf49cbe843b5b659e5

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

require 'minitest/autorun'
require 'confuse'

class Foo < Confuse::ConfigBase
  define :foo do
    default 'foo'
  end
end

class TestConfigBase < MiniTest::Unit::TestCase
  def test_two_instances_can_exist_with_different_values
    # instatiate two versions of the config
    config1 = Foo.new
    config2 = Foo.new

    # change the values of one of them
    config1[:foo] = 'bar'

    # assert only one has changed
    assert_equal 'bar', config1[:foo]
    assert_equal 'foo', config2[:foo]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
confuse-0.1.4 test/test_config_base.rb