summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-12-12 14:20:24 +0000
committerSteve Kemp <steve@steve.org.uk>2012-12-12 14:20:24 +0000
commit7acbd4e0c3f108f8417ac20419adead2309316a3 (patch)
tree6decc21da8d1b969140f40613ac815647ccd30c9
parentf40d0a37c6b99e88bb1ffc66e3421bf4e51a55e9 (diff)
Added simple is-singleton test.
-rwxr-xr-xt/test-custodian-settings.rb41
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