jasmine-core 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/console/console.js +54 -24
  3. data/lib/jasmine-core/__init__.py +1 -0
  4. data/lib/jasmine-core/boot/boot.js +2 -63
  5. data/lib/jasmine-core/boot/node_boot.js +19 -0
  6. data/lib/jasmine-core/boot.js +3 -64
  7. data/lib/jasmine-core/core.py +60 -0
  8. data/lib/jasmine-core/example/node_example/spec/PlayerSpec.js +60 -0
  9. data/lib/jasmine-core/example/node_example/spec/SpecHelper.js +15 -0
  10. data/lib/jasmine-core/example/node_example/src/Player.js +24 -0
  11. data/lib/jasmine-core/example/node_example/src/Song.js +9 -0
  12. data/lib/jasmine-core/jasmine-html.js +119 -74
  13. data/lib/jasmine-core/jasmine.css +61 -54
  14. data/lib/jasmine-core/jasmine.js +961 -456
  15. data/lib/jasmine-core/json2.js +73 -62
  16. data/lib/jasmine-core/node_boot.js +41 -0
  17. data/lib/jasmine-core/spec/console/ConsoleReporterSpec.js +52 -8
  18. data/lib/jasmine-core/spec/core/AnySpec.js +1 -0
  19. data/lib/jasmine-core/spec/core/ClockSpec.js +122 -18
  20. data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +14 -1
  21. data/lib/jasmine-core/spec/core/EnvSpec.js +0 -63
  22. data/lib/jasmine-core/spec/core/ExceptionFormatterSpec.js +7 -0
  23. data/lib/jasmine-core/spec/core/ExceptionsSpec.js +2 -2
  24. data/lib/jasmine-core/spec/core/ExpectationSpec.js +46 -50
  25. data/lib/jasmine-core/spec/core/JsApiReporterSpec.js +37 -0
  26. data/lib/jasmine-core/spec/core/MockDateSpec.js +200 -0
  27. data/lib/jasmine-core/spec/core/ObjectContainingSpec.js +6 -0
  28. data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +49 -12
  29. data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +184 -60
  30. data/lib/jasmine-core/spec/core/SpecSpec.js +46 -108
  31. data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +55 -0
  32. data/lib/jasmine-core/spec/core/SpySpec.js +10 -0
  33. data/lib/jasmine-core/spec/core/SpyStrategySpec.js +13 -0
  34. data/lib/jasmine-core/spec/core/SuiteSpec.js +143 -11
  35. data/lib/jasmine-core/spec/core/TimerSpec.js +18 -0
  36. data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +34 -32
  37. data/lib/jasmine-core/spec/core/integration/EnvSpec.js +969 -36
  38. data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +279 -3
  39. data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +18 -1
  40. data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanSpec.js +2 -1
  41. data/lib/jasmine-core/spec/core/matchers/toBeNaNSpec.js +3 -2
  42. data/lib/jasmine-core/spec/core/matchers/toBeUndefinedSpec.js +2 -1
  43. data/lib/jasmine-core/spec/core/matchers/toContainSpec.js +4 -2
  44. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledSpec.js +2 -1
  45. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledWithSpec.js +17 -3
  46. data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +14 -14
  47. data/lib/jasmine-core/spec/core/matchers/toThrowSpec.js +5 -5
  48. data/lib/jasmine-core/spec/helpers/defineJasmineUnderTest.js +7 -0
  49. data/lib/jasmine-core/spec/helpers/nodeDefineJasmineUnderTest.js +33 -0
  50. data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +183 -35
  51. data/lib/jasmine-core/spec/html/PrettyPrintHtmlSpec.js +1 -1
  52. data/lib/jasmine-core/spec/node_suite.js +9 -1
  53. data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +104 -0
  54. data/lib/jasmine-core/spec/performance/large_object_test.js +36 -0
  55. data/lib/jasmine-core/version.rb +1 -1
  56. data/lib/jasmine-core.js +37 -0
  57. data/lib/jasmine-core.rb +6 -2
  58. metadata +23 -9
  59. data/lib/jasmine-core/spec/support/dev_boot.js +0 -124
@@ -38,13 +38,13 @@ describe("Custom Matchers (Integration)", function() {
38
38
  });
39
39
 
40
40
  it("passes the spec if the custom matcher passes", function(done) {
41
- env.addMatchers({
42
- toBeReal: function() {
43
- return { compare: function() { return { pass: true }; } };
44
- }
45
- });
46
-
47
41
  env.it("spec using custom matcher", function() {
42
+ env.addMatchers({
43
+ toBeReal: function() {
44
+ return { compare: function() { return { pass: true }; } };
45
+ }
46
+ });
47
+
48
48
  env.expect(true).toBeReal();
49
49
  });
50
50
 
@@ -57,16 +57,16 @@ describe("Custom Matchers (Integration)", function() {
57
57
  });
58
58
 
59
59
  it("uses the negative compare function for a negative comparison, if provided", function(done) {
60
- env.addMatchers({
61
- toBeReal: function() {
62
- return {
63
- compare: function() { return { pass: true }; },
64
- negativeCompare: function() { return { pass: true }; }
65
- };
66
- }
67
- });
68
-
69
60
  env.it("spec with custom negative comparison matcher", function() {
61
+ env.addMatchers({
62
+ toBeReal: function() {
63
+ return {
64
+ compare: function() { return { pass: true }; },
65
+ negativeCompare: function() { return { pass: true }; }
66
+ };
67
+ }
68
+ });
69
+
70
70
  env.expect(true).not.toBeReal();
71
71
  });
72
72
 
@@ -79,17 +79,17 @@ describe("Custom Matchers (Integration)", function() {
79
79
  });
80
80
 
81
81
  it("generates messages with the same rules as built in matchers absent a custom message", function(done) {
82
- env.addMatchers({
83
- toBeReal: function() {
84
- return {
85
- compare: function() {
86
- return { pass: false };
82
+ env.it('spec with an expectation', function() {
83
+ env.addMatchers({
84
+ toBeReal: function() {
85
+ return {
86
+ compare: function() {
87
+ return { pass: false };
88
+ }
87
89
  }
88
90
  }
89
- }
90
- });
91
+ });
91
92
 
92
- env.it('spec with an expectation', function() {
93
93
  env.expect("a").toBeReal();
94
94
  });
95
95
 
@@ -103,13 +103,14 @@ describe("Custom Matchers (Integration)", function() {
103
103
 
104
104
  it("passes the expected and actual arguments to the comparison function", function(done) {
105
105
  var argumentSpy = jasmine.createSpy("argument spy").and.returnValue({ pass: true });
106
- env.addMatchers({
107
- toBeReal: function() {
108
- return { compare: argumentSpy };
109
- }
110
- });
111
106
 
112
107
  env.it('spec with an expectation', function () {
108
+ env.addMatchers({
109
+ toBeReal: function() {
110
+ return { compare: argumentSpy };
111
+ }
112
+ });
113
+
113
114
  env.expect(true).toBeReal();
114
115
  env.expect(true).toBeReal("arg");
115
116
  env.expect(true).toBeReal("arg1", "arg2");
@@ -130,12 +131,13 @@ describe("Custom Matchers (Integration)", function() {
130
131
  argumentSpy = jasmine.createSpy("argument spy").and.returnValue(matcherFactory),
131
132
  customEqualityFn = function() { return true; };
132
133
 
133
- env.addCustomEqualityTester(customEqualityFn);
134
- env.addMatchers({
135
- toBeReal: argumentSpy
136
- });
137
134
 
138
135
  env.it("spec with expectation", function() {
136
+ env.addCustomEqualityTester(customEqualityFn);
137
+ env.addMatchers({
138
+ toBeReal: argumentSpy
139
+ });
140
+
139
141
  env.expect(true).toBeReal();
140
142
  });
141
143