Permalink
Browse files

Fixing minor typos on existing specs

  • Loading branch information...
1 parent 4f1c767 commit e8769a2ed5fa818e10023f9163b5f7becad7f79c @gtramontina gtramontina committed Jun 22, 2011
Showing with 50 additions and 48 deletions.
  1. +33 −32 spec/jessie/formatters/nested_spec.js
  2. +17 −16 spec/jessie/formatters/progress_spec.js
@@ -1,10 +1,10 @@
describe('formatters', function() {
var reporter = new (require('jessie/reporter')).reporter('nested')
-
+
describe('nested formatter', function() {
-
+
describe('single spec', function() {
-
+
it("should use the green spec description to render a successful spec", function() {
capture = require('helpers/stdout').capture(function() {
reporter.formatter.spec({fail: false}, {description: 'my spec'})
@@ -23,7 +23,7 @@ describe('formatters', function() {
reporter.formatter.depth = original_depth
})
- it("should use the yello spec description to render a pending spec", function() {
+ it("should use the yellow spec description to render a pending spec", function() {
var original_depth = reporter.formatter.depth
capture = require('helpers/stdout').capture(function() {
reporter.formatter.spec({pending: true}, {description: 'my spec'})
@@ -32,7 +32,7 @@ describe('formatters', function() {
capture.output().should_match(/\033\[33m/) // yellow
reporter.formatter.depth = original_depth
})
-
+
it("should render the spec with appropriate spacing on the left", function() {
var original_depth = reporter.formatter.depth
reporter.formatter.depth = 1
@@ -49,25 +49,25 @@ describe('formatters', function() {
capture.output().should_match(/^ {4}/)
reporter.formatter.depth = original_depth
})
-
+
})
-
+
describe('single suite', function() {
it("should render the suite name", function() {
var original_depth = reporter.formatter.depth
-
+
capture = require('helpers/stdout').capture(function() {
reporter.formatter.suiteStart({description: 'my suite'})
})
capture.output().should_match('my suite')
reporter.formatter.depth = original_depth
-
- })
+
+ })
it("should render the suite name with appropriate spacing on the left", function() {
var original_depth = reporter.formatter.depth
-
+
reporter.formatter.depth = 1
capture = require('helpers/stdout').capture(function() {
reporter.formatter.suiteStart({description: 'my suite'})
@@ -78,7 +78,7 @@ describe('formatters', function() {
reporter.formatter.depth.should_be(2)
reporter.formatter.suite()
reporter.formatter.depth.should_be(1)
-
+
reporter.formatter.depth = 2
capture = require('helpers/stdout').capture(function() {
reporter.formatter.suiteStart({description: 'my suite'})
@@ -91,39 +91,39 @@ describe('formatters', function() {
it("should increase depth when starting a suite", function() {
var original_depth = reporter.formatter.depth
-
+
reporter.formatter.depth = 1
capture = require('helpers/stdout').capture(function() {
reporter.formatter.suiteStart({description: 'my suite'})
})
-
+
reporter.formatter.depth.should_be(2)
reporter.formatter.depth = original_depth
-
+
})
-
+
it("should decrease depth when ending a suite", function() {
var original_depth = reporter.formatter.depth
-
+
reporter.formatter.depth = 2
reporter.formatter.suite()
reporter.formatter.depth.should_be(1)
-
+
reporter.formatter.depth = original_depth
-
+
})
-
+
})
-
+
describe('summary', function() {
var result = {duration: 15, failed: 1, total: 2}
result.failures= [{
description: 'it should print errors',
message: 'Expected A to be B',
stacktrace: ['Expected A to be B', 'file.js:23:2', 'another_file.js:30:11']
}]
-
+
it("should properly render a summary", function() {
capture = require('helpers/stdout').capture(function() {
reporter.formatter.finish(result)
@@ -135,17 +135,17 @@ describe('formatters', function() {
capture.output().should_match('Expected A to be B')
capture.output().should_match('file.js:23:2')
capture.output().should_match('another_file.js:30:11')
-
+
})
-
+
it("should properly render a summary with pending and failing specs", function() {
var result = {duration: 15, failed: 1, total: 3, pending: 1}
result.failures= [{
description: 'it should print errors',
message: 'Expected A to be B',
stacktrace: ['Expected A to be B', 'file.js:23:2', 'another_file.js:30:11']
}]
-
+
capture = require('helpers/stdout').capture(function() {
reporter.formatter.finish(result)
})
@@ -156,7 +156,7 @@ describe('formatters', function() {
capture.output().should_match('it should print errors')
capture.output().should_match('Expected A to be B')
capture.output().should_match('file.js:23:2')
- capture.output().should_match('another_file.js:30:11')
+ capture.output().should_match('another_file.js:30:11')
})
it("should properly render a summary with pending and failing specs", function() {
@@ -166,7 +166,7 @@ describe('formatters', function() {
message: 'Expected A to be B',
stacktrace: ['Expected A to be B', 'file.js:23:2', 'another_file.js:30:11']
}]
-
+
capture = require('helpers/stdout').capture(function() {
reporter.formatter.finish(result)
})
@@ -177,11 +177,12 @@ describe('formatters', function() {
capture.output().should_match('it should print errors')
capture.output().should_match('Expected A to be B')
capture.output().should_match('file.js:23:2')
- capture.output().should_match('another_file.js:30:11')
+ capture.output().should_match('another_file.js:30:11')
})
-
-
+
+
})
})
-
-})
+
+})
+
@@ -1,10 +1,10 @@
describe('formatters', function() {
var reporter = new (require('jessie/reporter')).reporter('progress')
-
+
describe('progress formatter', function() {
-
+
describe('single spec', function() {
-
+
it("should use a dot to render a successful spec", function() {
capture = require('helpers/stdout').capture(function() {
reporter.formatter.spec({fail: false})
@@ -13,32 +13,32 @@ describe('formatters', function() {
capture.output().should_match(/\033\[32m/) // green
})
- it("should use a start to render a pending spec", function() {
+ it("should use a star to render a pending spec", function() {
capture = require('helpers/stdout').capture(function() {
reporter.formatter.spec({pending: true})
})
capture.output().should_match(/\*/)
capture.output().should_match(/\033\[33m/) // yellow
})
- it("should use a F to render a successful spec", function() {
+ it("should use a F to render a failed spec", function() {
capture = require('helpers/stdout').capture(function() {
reporter.formatter.spec({fail: true})
})
capture.output().should_match('F')
capture.output().should_match(/\033\[31m/) // red
})
-
+
})
-
+
describe('summary', function() {
var result = {duration: 15, failed: 1, total: 2}
result.failures= [{
description: 'it should print errors',
message: 'Expected A to be B',
stacktrace: ['Expected A to be B', 'file.js:23:2', 'another_file.js:30:11']
}]
-
+
it("should properly render a summary", function() {
capture = require('helpers/stdout').capture(function() {
reporter.formatter.finish(result)
@@ -50,7 +50,7 @@ describe('formatters', function() {
capture.output().should_match('Expected A to be B')
capture.output().should_match('file.js:23:2')
capture.output().should_match('another_file.js:30:11')
-
+
})
it("should properly render a summary with pending and failing specs", function() {
@@ -60,7 +60,7 @@ describe('formatters', function() {
message: 'Expected A to be B',
stacktrace: ['Expected A to be B', 'file.js:23:2', 'another_file.js:30:11']
}]
-
+
capture = require('helpers/stdout').capture(function() {
reporter.formatter.finish(result)
})
@@ -71,7 +71,7 @@ describe('formatters', function() {
capture.output().should_match('it should print errors')
capture.output().should_match('Expected A to be B')
capture.output().should_match('file.js:23:2')
- capture.output().should_match('another_file.js:30:11')
+ capture.output().should_match('another_file.js:30:11')
})
it("should properly render a summary with pending and failing specs", function() {
@@ -81,7 +81,7 @@ describe('formatters', function() {
message: 'Expected A to be B',
stacktrace: ['Expected A to be B', 'file.js:23:2', 'another_file.js:30:11']
}]
-
+
capture = require('helpers/stdout').capture(function() {
reporter.formatter.finish(result)
})
@@ -92,10 +92,11 @@ describe('formatters', function() {
capture.output().should_match('it should print errors')
capture.output().should_match('Expected A to be B')
capture.output().should_match('file.js:23:2')
- capture.output().should_match('another_file.js:30:11')
+ capture.output().should_match('another_file.js:30:11')
})
-
+
})
})
-
-})
+
+})
+

0 comments on commit e8769a2

Please sign in to comment.