diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-12-12 14:20:24 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-12-12 14:20:24 +0000 |
commit | cdc739a4bc2ad25f110ec446188f36c5ab2f68b6 (patch) | |
tree | 77f660c1bd97bc5b34793cb13a0fcacb2317b32d | |
parent | 2bf306af28e07feab9efd81e0bb1d67b74eee8d2 (diff) |
Added simple is-singleton test.
-rwxr-xr-x | t/test-custodian-settings.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/t/test-custodian-settings.rb b/t/test-custodian-settings.rb new file mode 100755 index 0000000..a39b545 --- /dev/null +++ b/t/test-custodian-settings.rb @@ -0,0 +1,41 @@ +#!/usr/bin/ruby1.8 -I./lib/ -I../lib/ + + +require 'custodian/settings' +require 'test/unit' + + + +# +# Unit test for our configuration file reader. +# +# +class TestConfigurationSingleton < Test::Unit::TestCase + + # + # Create the test suite environment: NOP. + # + def setup + end + + # + # Destroy the test suite environment: NOP. + # + def teardown + end + + + # + # Test that we're genuinely a singleton + # + def test_singleton + a = Custodian::Settings.instance() + b = Custodian::Settings.instance() + + assert( a ) + assert( b ) + assert_equal( a.object_id, b.object_id ) + end + + +end |