From f5486bde35ef5da44259cce6e03ff7f3daae7423 Mon Sep 17 00:00:00 2001 From: pivotal Date: Thu, 4 Dec 2008 09:15:07 -0800 Subject: [PATCH] dwf: cleaned up code formatting in README --- README.markdown | 46 +++++++++++++++++++++++----------------------- jasmine.iws | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/README.markdown b/README.markdown index 7acd3ac..89b73fc 100644 --- a/README.markdown +++ b/README.markdown @@ -64,9 +64,9 @@ Your spec can call `runs()` multiple times if you need to break your spec up for }); runs(function () { - this.foo++; - - this.expects_that(this.foo).should_equal(2); + this.foo++; + + this.expects_that(this.foo).should_equal(2); }) }); @@ -82,21 +82,21 @@ Jasmine allows you to do this by chaining calls to `runs()` with calls to `waits it('should be a test', function () { runs(function () { - this.foo = 0; + this.foo = 0; var that = this; - setTimeout(function () {} - that.foo++; - }, 250); - }); - - runs(function () { - this.expects_that(this.foo).should_equal(0); - }); - - waits(500); - + setTimeout(function () { + that.foo++; + }, 250); + }); + runs(function () { - this.expects_that(this.foo).should_equal(1); + this.expects_that(this.foo).should_equal(0); + }); + + waits(500); + + runs(function () { + this.expects_that(this.foo).should_equal(1); }); }); @@ -111,14 +111,14 @@ What's happening here? Specs are grouped in Suites. Suites are defined using the global `describe()` function: - describe('One suite', function () { - it('has a test', function () { - ... - }); - - it('has another test', function () { + describe('One suite', function () { + it('has a test', function () { ... - }); + }); + + it('has another test', function () { + ... + }); }); The name is so that reporting is more descriptive. diff --git a/jasmine.iws b/jasmine.iws index 361b61a..38cdd56 100644 --- a/jasmine.iws +++ b/jasmine.iws @@ -110,7 +110,7 @@ - + @@ -538,7 +538,7 @@ - +