1 describe("app.ux.singleton", function(){
3 var Singleton = window.app.ux.Singleton;
5 describe("creating a singleton", function() {
6 var X = Singleton.extend({
12 var Y = Singleton.extend({
18 it("should have properties like a normal class", function() {
21 expect( a instanceof X ).toBe( true );
22 expect( a.foo() ).toBe( "bar" );
25 it("should return single instance each time instance() is called", function() {
29 expect( a ).toBe( b );
32 it("should not share instances with different singletons", function() {
36 expect( a ).not.toBe( c );