From 1154fcaf3b4f2f5b0c0197dbdd0f5ab0280499e0 Mon Sep 17 00:00:00 2001 From: Lee Byrd & Christian Williams Date: Tue, 22 Jun 2010 16:45:35 -0700 Subject: [PATCH] Refactor. --- spec/suites/BaseSpec.js | 46 +++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/spec/suites/BaseSpec.js b/spec/suites/BaseSpec.js index 1e884cc..fd1a2db 100644 --- a/spec/suites/BaseSpec.js +++ b/spec/suites/BaseSpec.js @@ -1,25 +1,27 @@ -describe("jasmine.MessageResult", function() { - it("#toString should pretty-print and concatenate each part of the message", function() { - var values = ["log", "message", 123, {key: "value"}, "FTW!"]; - var messageResult = new jasmine.MessageResult(values); - expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!"); - }); -}); +describe("base.js", function() { + describe("jasmine.MessageResult", function() { + it("#toString should pretty-print and concatenate each part of the message", function() { + var values = ["log", "message", 123, {key: "value"}, "FTW!"]; + var messageResult = new jasmine.MessageResult(values); + expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!"); + }); + }); -describe("jasmine.log", function() { - it("should accept n arguments", function() { - spyOn(jasmine.getEnv().currentSpec, 'log'); - jasmine.log(1, 2, 3); - expect(jasmine.getEnv().currentSpec.log).wasCalledWith(1, 2, 3); + describe("jasmine.log", function() { + it("should accept n arguments", function() { + spyOn(jasmine.getEnv().currentSpec, 'log'); + jasmine.log(1, 2, 3); + expect(jasmine.getEnv().currentSpec.log).wasCalledWith(1, 2, 3); + }); + }); + + describe("jasmine.getGlobal", function() { + it("should return the global object", function() { + var globalObject = (function() { + return this; + })(); + + expect(jasmine.getGlobal()).toBe(globalObject); + }); }); }); - -describe("jasmine.getGlobal", function() { - it("should return the global object", function() { - var globalObject = (function() { - return this; - })(); - - expect(jasmine.getGlobal()).toBe(globalObject); - }); -}); \ No newline at end of file