teabag 0.4.3 → 0.4.4

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 (76) hide show
  1. data/README.md +10 -12
  2. data/app/assets/javascripts/teabag-jasmine.js +4 -1
  3. data/app/assets/javascripts/teabag-mocha.js +4 -1
  4. data/app/assets/javascripts/teabag-qunit.js +4 -1
  5. data/app/assets/javascripts/teabag/base/reporters/html.coffee +1 -1
  6. data/lib/teabag/version.rb +1 -1
  7. data/spec/dummy/log/development.log +4350 -0
  8. data/spec/dummy/log/test.log +37 -0
  9. data/spec/dummy/tmp/cache/assets/C72/150/sprockets%2F4194031b4b51b6422c14ac697e3455e5 +0 -0
  10. data/spec/dummy/tmp/cache/assets/C75/D50/sprockets%2F5302968a40e08d2c011aa38666d273f6 +0 -0
  11. data/spec/dummy/tmp/cache/assets/C89/700/sprockets%2F259935a7704fef0069303ea63fa89408 +0 -0
  12. data/spec/dummy/tmp/cache/assets/C8A/460/sprockets%2F77bffd9959420103906722b404ae8d59 +0 -0
  13. data/spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 +0 -0
  14. data/spec/dummy/tmp/cache/assets/CA9/C40/sprockets%2F932b7e2cd1e067289ab51190800814df +0 -0
  15. data/spec/dummy/tmp/cache/assets/CAA/0C0/sprockets%2F057b0ce384f16d9202ae84473436cc35 +0 -0
  16. data/spec/dummy/tmp/cache/assets/CAD/410/sprockets%2F651414e5c7e86f05c5108dc71626b25c +0 -0
  17. data/spec/dummy/tmp/cache/assets/CAF/0F0/sprockets%2F6000e67cf3f2377f860c24da7c819701 +0 -0
  18. data/spec/dummy/tmp/cache/assets/CBB/FA0/sprockets%2F74922109263bdc965b2e9567eec6d154 +0 -0
  19. data/spec/dummy/tmp/cache/assets/CBF/630/sprockets%2F707d2db81468088470d476abff35388d +0 -0
  20. data/spec/dummy/tmp/cache/assets/CCE/C50/sprockets%2Fe12774c2fea852112414bb379a71f31a +0 -0
  21. data/spec/dummy/tmp/cache/assets/CD1/620/sprockets%2F06a3eb05fcb4175a679d6084a06026a6 +0 -0
  22. data/spec/dummy/tmp/cache/assets/CD3/460/sprockets%2F7f3f6802b0b309ed142d0b671c9640c4 +0 -0
  23. data/spec/dummy/tmp/cache/assets/CE0/090/sprockets%2F48d5d35ae87d0723318b8bc257fa2237 +0 -0
  24. data/spec/dummy/tmp/cache/assets/CE3/1F0/sprockets%2Fe69a515d3a9d14c669be8871012a7d07 +0 -0
  25. data/spec/dummy/tmp/cache/assets/CE6/270/sprockets%2F2c98152560d18470fec8cf4c6829b4d0 +0 -0
  26. data/spec/dummy/tmp/cache/assets/CE6/7C0/sprockets%2Fa03a2c86ce6724be8542295e1cf24798 +0 -0
  27. data/spec/dummy/tmp/cache/assets/CE7/A60/sprockets%2Ff58eee249aa167d23f8220087bb46684 +0 -0
  28. data/spec/dummy/tmp/cache/assets/CE9/9E0/sprockets%2F135480d497ed7e4884462dc0ef0b80d7 +0 -0
  29. data/spec/dummy/tmp/cache/assets/CEB/B40/sprockets%2F1150bf8d912aa100a132251eefaf6045 +0 -0
  30. data/spec/dummy/tmp/cache/assets/CFA/D20/sprockets%2Fb26796b39b3c5d6ed70be7989637a493 +0 -0
  31. data/spec/dummy/tmp/cache/assets/CFC/380/sprockets%2Fa7443cbd671446a589867dd5f4a4f989 +0 -0
  32. data/spec/dummy/tmp/cache/assets/D00/110/sprockets%2F6a6353b7723a8b21708e0fbfe04bd422 +0 -0
  33. data/spec/dummy/tmp/cache/assets/D00/F60/sprockets%2F42e279b52511c47d26c0adb125fd04e8 +0 -0
  34. data/spec/dummy/tmp/cache/assets/D03/630/sprockets%2F5d8da32dba6a7be70426a1d554773701 +0 -0
  35. data/spec/dummy/tmp/cache/assets/D04/170/sprockets%2F76ab1dc02e6c7618852708a1e05a2df3 +0 -0
  36. data/spec/dummy/tmp/cache/assets/D04/480/sprockets%2F8bd8f10500b21d2f9d94e4cd1401c936 +0 -0
  37. data/spec/dummy/tmp/cache/assets/D05/8D0/sprockets%2F319f8f235f452343f1ebf03cb262d23d +0 -0
  38. data/spec/dummy/tmp/cache/assets/D09/BF0/sprockets%2F9e6bca5d26f50d9484385d51ba04312c +0 -0
  39. data/spec/dummy/tmp/cache/assets/D31/9C0/sprockets%2Fbd102a4f5a4985c3519dd6ab0295a1c6 +0 -0
  40. data/spec/dummy/tmp/cache/assets/D35/7C0/sprockets%2Ff536a2606eaf7d542c0985104cb62baf +0 -0
  41. data/spec/dummy/tmp/cache/assets/D3C/840/sprockets%2Fc6202ec91d567a85bd3d46dc43ea9108 +0 -0
  42. data/spec/dummy/tmp/cache/assets/D45/C30/sprockets%2Fcc744877558178a3adb77c441cadce70 +0 -0
  43. data/spec/dummy/tmp/cache/assets/D49/A10/sprockets%2Fc4656bd995a6f297c26d19b13aadb963 +0 -0
  44. data/spec/dummy/tmp/cache/assets/D50/D70/sprockets%2Fe2a3e6c95b11e0801a4eebae3a026026 +0 -0
  45. data/spec/dummy/tmp/cache/assets/D51/400/sprockets%2Ff5e433d8a31e80985b75ce598de236be +0 -0
  46. data/spec/dummy/tmp/cache/assets/D67/BC0/sprockets%2F35d2c2b45981ade5a2db2a9c7f37a615 +0 -0
  47. data/spec/dummy/tmp/cache/assets/D69/F90/sprockets%2F6a0795b7b38bd7e6142cd1b88211dade +0 -0
  48. data/spec/dummy/tmp/cache/assets/D6A/950/sprockets%2F429b1806cb7580ebf29f9a12c33cbea6 +0 -0
  49. data/spec/dummy/tmp/cache/assets/D6D/DA0/sprockets%2Fac936bf40b42227a2bf9d474ae9ec149 +0 -0
  50. data/spec/dummy/tmp/cache/assets/D6F/5B0/sprockets%2F5dcc801a7a6c340c5baf525839f9b8b6 +0 -0
  51. data/spec/dummy/tmp/cache/assets/D78/2F0/sprockets%2F3c61f8915b8f717b1de788e6ecad122c +0 -0
  52. data/spec/dummy/tmp/cache/assets/D93/BD0/sprockets%2Ff5e1b60201e08e3ddf8d3de5211f3d5e +0 -0
  53. data/spec/dummy/tmp/cache/assets/DA5/0A0/sprockets%2F7a4b5928cec69ab65afff309a04d6b47 +0 -0
  54. data/spec/dummy/tmp/cache/assets/DA9/BF0/sprockets%2Fc59f8f7bf494fe030610bc86bb7cc5e5 +0 -0
  55. data/spec/dummy/tmp/cache/assets/DAE/6C0/sprockets%2F77c7a8676aeefa73156c55dfcf51cc46 +0 -0
  56. data/spec/dummy/tmp/cache/assets/DB3/5D0/sprockets%2Fce1d4d75832c9bdeafd869f6f7b61725 +0 -0
  57. data/spec/dummy/tmp/cache/assets/DB5/040/sprockets%2F9a9da5df88713663b9fbc945facca891 +0 -0
  58. data/spec/dummy/tmp/cache/assets/DC7/A10/sprockets%2F84a8af0fcbf401864e1ae5bf092cba94 +0 -0
  59. data/spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 +0 -0
  60. data/spec/dummy/tmp/cache/assets/DF7/E10/sprockets%2F25e4253aba9a9adcefb72552fb1ff0c8 +0 -0
  61. data/spec/dummy/tmp/cache/assets/DFC/C30/sprockets%2Fb50a07cb30b0bd0eec8e98e5de79d65d +0 -0
  62. data/spec/dummy/tmp/cache/assets/E02/6E0/sprockets%2F63d6a5cdb8cefa64ef76b5c6e0fd3720 +0 -0
  63. data/spec/dummy/tmp/cache/assets/E08/F20/sprockets%2F4fc5cdcd6974efe7adfe809b30bd6513 +0 -0
  64. data/spec/dummy/tmp/cache/assets/E41/250/sprockets%2F97cf8fe3d7ffaff076f655aefb36da03 +0 -0
  65. data/spec/dummy/tmp/cache/assets/E6E/260/sprockets%2Fd9f8ab8b91ef582cc6c99a3ba0dedfe6 +0 -0
  66. data/spec/dummy/tmp/cache/assets/F79/360/sprockets%2F0ce035fefee5ebdabc8efabfbdbd6ee4 +0 -0
  67. data/test/javascripts/qunit_helper.coffee +3 -0
  68. data/test/javascripts/teabag/qunit/models_test.coffee +62 -0
  69. data/test/javascripts/teabag/qunit/qunit_test.coffee +43 -0
  70. data/test/javascripts/teabag/qunit/reporters/console_test.coffee +3 -0
  71. data/test/javascripts/teabag/qunit/reporters/html/failure_view_test.coffee +3 -0
  72. data/test/javascripts/teabag/qunit/reporters/html/spec_view_test.coffee +3 -0
  73. data/test/javascripts/teabag/qunit/reporters/html/suite_view_test.coffee +3 -0
  74. data/test/javascripts/teabag/qunit/reporters/html_test.coffee +3 -0
  75. data/test/javascripts/teabag/qunit/runner_test.coffee +20 -0
  76. metadata +25 -5
@@ -4344,3 +4344,40 @@ Compiled drivers/phantomjs/runner.js (120ms) (pid 9031)
4344
4344
  Compiled teabag/phantomjs/runner_spec.js (267ms) (pid 9031)
4345
4345
  Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1596.3ms)
4346
4346
  Completed 200 OK in 1628ms (Views: 1627.5ms)
4347
+ Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-28 17:11:26 -0700
4348
+ Processing by Teabag::SpecController#index as */*
4349
+ Parameters: {"suite"=>"foo"}
4350
+ Compiled teabag-jasmine.js (0ms) (pid 13276)
4351
+ Compiled spec_helper.js (103ms) (pid 13276)
4352
+ Compiled teabag/base/fixture_spec.js (131ms) (pid 13276)
4353
+ Compiled teabag/base/reporters/console_spec.js (133ms) (pid 13276)
4354
+ Compiled teabag/base/reporters/html/base_view_spec.js (121ms) (pid 13276)
4355
+ Compiled teabag/base/reporters/html/failure_view_spec.js (106ms) (pid 13276)
4356
+ Compiled teabag/base/reporters/html/progress_view_spec.js (93ms) (pid 13276)
4357
+ Compiled teabag/base/reporters/html/spec_view_spec.js (122ms) (pid 13276)
4358
+ Compiled teabag/base/reporters/html/suite_view_spec.js (94ms) (pid 13276)
4359
+ Compiled teabag/base/reporters/html_spec.js (167ms) (pid 13276)
4360
+ Compiled teabag/base/runner_spec.js (116ms) (pid 13276)
4361
+ Compiled teabag/base/teabag_spec.js (110ms) (pid 13276)
4362
+ Compiled drivers/phantomjs/runner.js (119ms) (pid 13276)
4363
+ Compiled teabag/phantomjs/runner_spec.js (261ms) (pid 13276)
4364
+ Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1717.7ms)
4365
+ Completed 200 OK in 1729ms (Views: 1728.9ms)
4366
+ Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-28 17:12:06 -0700
4367
+ Processing by Teabag::SpecController#index as */*
4368
+ Parameters: {"suite"=>"foo"}
4369
+ Compiled spec_helper.js (119ms) (pid 13611)
4370
+ Compiled teabag/base/fixture_spec.js (132ms) (pid 13611)
4371
+ Compiled teabag/base/reporters/console_spec.js (134ms) (pid 13611)
4372
+ Compiled teabag/base/reporters/html/base_view_spec.js (122ms) (pid 13611)
4373
+ Compiled teabag/base/reporters/html/failure_view_spec.js (94ms) (pid 13611)
4374
+ Compiled teabag/base/reporters/html/progress_view_spec.js (135ms) (pid 13611)
4375
+ Compiled teabag/base/reporters/html/spec_view_spec.js (94ms) (pid 13611)
4376
+ Compiled teabag/base/reporters/html/suite_view_spec.js (93ms) (pid 13611)
4377
+ Compiled teabag/base/reporters/html_spec.js (168ms) (pid 13611)
4378
+ Compiled teabag/base/runner_spec.js (117ms) (pid 13611)
4379
+ Compiled teabag/base/teabag_spec.js (110ms) (pid 13611)
4380
+ Compiled drivers/phantomjs/runner.js (119ms) (pid 13611)
4381
+ Compiled teabag/phantomjs/runner_spec.js (264ms) (pid 13611)
4382
+ Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1722.0ms)
4383
+ Completed 200 OK in 1733ms (Views: 1732.5ms)
@@ -0,0 +1,3 @@
1
+ #= require support/sinon
2
+ window.passing = true
3
+ window.failing = false
@@ -0,0 +1,62 @@
1
+ module "QUnit Teabag.Spec",
2
+ setup: ->
3
+ @mockAssertions = [
4
+ {message: "_qunit_message1_", source: "_source1_"}
5
+ {message: "_qunit_message2_", source: "_source2_"}
6
+ ]
7
+ @mockSpec =
8
+ module: "_full qunit name_"
9
+ name: "_description_"
10
+ failed: 1
11
+ passed: 2
12
+ total: 3
13
+ viewId: 420
14
+ assertions: @mockAssertions
15
+
16
+ test "constructor", 7, ->
17
+ spec = new Teabag.Spec(@mockSpec)
18
+ ok(spec.fullDescription == "_full qunit name_ _description_", "sets fullDescription")
19
+ ok(spec.description == "_description_ (1, 2, 3)", "sets description")
20
+ ok(spec.link == "?grep=_full%20qunit%20name_%3A%20_description_", "sets link")
21
+ ok(spec.parent.description == "_full qunit name_", "builds a parent suite")
22
+ ok(spec.suiteName == "_full qunit name_", "sets suiteName")
23
+ ok(spec.viewId == 420, "sets viewId")
24
+ ok(spec.pending == false, "sets pending to false") # no pending support
25
+
26
+ test "#errors", 3, ->
27
+ errors = new Teabag.Spec(@mockSpec).errors()
28
+ ok(errors.length == 2, "returns the correct length array")
29
+ equal(errors[0].message, "_qunit_message1_", "the first item in the returned array is correct")
30
+ equal(errors[0].stack, "_source1_", "the first item in the returned array is correct")
31
+
32
+ test "#getParents", 3, ->
33
+ spec = new Teabag.Spec(@mockSpec)
34
+ ok(spec.getParents().length == 1, "returns the right number of parents")
35
+ ok(spec.getParents()[0].description == "_full qunit name_", "the parent has a description")
36
+
37
+ delete(@mockSpec.module)
38
+ spec = new Teabag.Spec(@mockSpec)
39
+ ok(spec.getParents().length == 0, "returns an empty array")
40
+
41
+ test "#result", 3, ->
42
+ @mockSpec.failed = 0
43
+ result = new Teabag.Spec(@mockSpec).result()
44
+ ok(result.status == "passed", "sets the status to passed")
45
+ ok(result.skipped == false, "sets skipped to false") # ever skipped?
46
+
47
+ @mockSpec.failed = 1
48
+ result = new Teabag.Spec(@mockSpec).result()
49
+ ok(result.status == "failed", "sets the status to failed")
50
+
51
+
52
+
53
+ module "QUnit Teabag.Suite",
54
+ setup: ->
55
+ @mockSuite = description: "_full qunit description_"
56
+
57
+ test "constructor", 4, ->
58
+ suite = new Teabag.Suite(@mockSuite)
59
+ ok(suite.fullDescription == "_full qunit description_", "sets fullDescription")
60
+ ok(suite.description == "_full qunit description_", "sets description")
61
+ ok(suite.link == "?grep=_full%20qunit%20description_", "sets link")
62
+ ok(suite.parent == null, "sets parent to null") # no structure to consider
@@ -0,0 +1,43 @@
1
+ console.log("testing console output")
2
+
3
+ test "doesn't need a module", ->
4
+ ok(passing == true, "Passing is true")
5
+
6
+ module "Teabag running QUnit"
7
+
8
+ test "is awesome", ->
9
+ ok(passing == true, "Passing is true")
10
+
11
+
12
+ module "Running tests",
13
+
14
+ test "actually tests", 1, ->
15
+ fixture("fixture.html")
16
+ ok(document.getElementById("fixture_view").tagName == "DIV", "loads the fixture")
17
+
18
+ test "can handle more than one test", ->
19
+ expect(1)
20
+ stop()
21
+ setTimeout ->
22
+ ok(passing == true, "Passing is true")
23
+ start()
24
+ , 1000
25
+
26
+
27
+ module "Failing tests"
28
+
29
+ test "can fail", ->
30
+ ok(failing == false, "Failing is false")
31
+ ok(failing == false, "Failing is false")
32
+
33
+
34
+ fixture.preload("fixture.html", "fixture.json") # make the actual requests for the files
35
+ module "Using fixtures",
36
+ setup: ->
37
+ fixture.set("<h2>Another Title</h2>") # create some markup manually
38
+ @fixtures = fixture.load("fixture.html", "fixture.json", true) # append these fixtures
39
+
40
+ test "loads fixtures", ->
41
+ ok(document.getElementById("fixture_view").tagName == "DIV", "is in the dom")
42
+ ok(@fixtures[0] == fixture.el, "has return values for the el") # the element is available as a return value and through fixture.el
43
+ ok(@fixtures[1].title == fixture.json[0].title, "has return values for json") # the json for json fixtures is returned, and available in fixture.json
@@ -0,0 +1,3 @@
1
+ module "QUnit Teabag.Resporters.Console"
2
+
3
+ test "constructor", 0, ->
@@ -0,0 +1,3 @@
1
+ module "QUnit Teabag.Reporters.HTML.FailureView"
2
+
3
+ test "constructor", 0, ->
@@ -0,0 +1,3 @@
1
+ module "QUnit Teabag.Reporters.HTML.SpecView"
2
+
3
+ test "constructor", 0, ->
@@ -0,0 +1,3 @@
1
+ module "QUnit Teabag.Reporters.HTML.SuiteView"
2
+
3
+ test "constructor", 0, ->
@@ -0,0 +1,3 @@
1
+ module "QUnit Teabag.Reporters.HTML"
2
+
3
+ test "constructor", 0, ->
@@ -0,0 +1,20 @@
1
+ module "QUnit Teabag.Runner",
2
+ setup: ->
3
+ QUnit.start = sinon.spy()
4
+ Teabag.Runner.prototype.reportRunnerStarting = sinon.spy()
5
+
6
+ test "constructor", 1, ->
7
+ new Teabag.Runner()
8
+ ok(QUnit.start.called, "QUnit.start was called")
9
+
10
+ test "#setup", ->
11
+ runner = new Teabag.Runner()
12
+ runner.params = {grep: "foo"}
13
+ reporter = ->
14
+ reporter.prototype.setFilter = sinon.spy()
15
+ runner.getReporter = sinon.spy(-> reporter)
16
+
17
+ runner.setup()
18
+
19
+ ok(runner.getReporter.called, "#getReporter was called")
20
+ ok(reporter.prototype.setFilter.args[0][0] == "foo", "#setFilter was called with 'foo'")
metadata CHANGED
@@ -1,11 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teabag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - jejacks0n
9
+ - jayzes
10
+ - jedschneider
9
11
  autorequire:
10
12
  bindir: bin
11
13
  cert_chain: []
@@ -59,8 +61,8 @@ dependencies:
59
61
  - - ! '>='
60
62
  - !ruby/object:Gem::Version
61
63
  version: 2.11.4
62
- description: Run Javascript tests using Jasmine or Mocha (with custom reporters) in
63
- the browser or headless using PhantomJS
64
+ description: Run Javascript tests using Jasmine, Mocha or QUnit in the browser or
65
+ headlessly using PhantomJS or with Selenium Webdriver
64
66
  email:
65
67
  - info@modeset.com
66
68
  executables: []
@@ -665,6 +667,15 @@ files:
665
667
  - spec/teabag/runner_spec.rb
666
668
  - spec/teabag/server_spec.rb
667
669
  - spec/teabag/suite_spec.rb
670
+ - test/javascripts/qunit_helper.coffee
671
+ - test/javascripts/teabag/qunit/models_test.coffee
672
+ - test/javascripts/teabag/qunit/qunit_test.coffee
673
+ - test/javascripts/teabag/qunit/reporters/console_test.coffee
674
+ - test/javascripts/teabag/qunit/reporters/html/failure_view_test.coffee
675
+ - test/javascripts/teabag/qunit/reporters/html/spec_view_test.coffee
676
+ - test/javascripts/teabag/qunit/reporters/html/suite_view_test.coffee
677
+ - test/javascripts/teabag/qunit/reporters/html_test.coffee
678
+ - test/javascripts/teabag/qunit/runner_test.coffee
668
679
  homepage: https://github.com/modeset/teabag
669
680
  licenses: []
670
681
  post_install_message:
@@ -679,7 +690,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
679
690
  version: '0'
680
691
  segments:
681
692
  - 0
682
- hash: 1409724492945098926
693
+ hash: 1903883753933915586
683
694
  required_rubygems_version: !ruby/object:Gem::Requirement
684
695
  none: false
685
696
  requirements:
@@ -688,7 +699,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
688
699
  version: '0'
689
700
  segments:
690
701
  - 0
691
- hash: 1409724492945098926
702
+ hash: 1903883753933915586
692
703
  requirements: []
693
704
  rubyforge_project:
694
705
  rubygems_version: 1.8.24
@@ -1230,3 +1241,12 @@ test_files:
1230
1241
  - spec/teabag/runner_spec.rb
1231
1242
  - spec/teabag/server_spec.rb
1232
1243
  - spec/teabag/suite_spec.rb
1244
+ - test/javascripts/qunit_helper.coffee
1245
+ - test/javascripts/teabag/qunit/models_test.coffee
1246
+ - test/javascripts/teabag/qunit/qunit_test.coffee
1247
+ - test/javascripts/teabag/qunit/reporters/console_test.coffee
1248
+ - test/javascripts/teabag/qunit/reporters/html/failure_view_test.coffee
1249
+ - test/javascripts/teabag/qunit/reporters/html/spec_view_test.coffee
1250
+ - test/javascripts/teabag/qunit/reporters/html/suite_view_test.coffee
1251
+ - test/javascripts/teabag/qunit/reporters/html_test.coffee
1252
+ - test/javascripts/teabag/qunit/runner_test.coffee