teabag 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. data/README.md +59 -59
  2. data/app/assets/javascripts/teabag-jasmine.js +229 -190
  3. data/app/assets/javascripts/teabag-mocha.js +217 -192
  4. data/app/assets/javascripts/teabag-qunit.js +3023 -0
  5. data/app/assets/javascripts/teabag/base/reporters/console.coffee +42 -26
  6. data/app/assets/javascripts/teabag/base/reporters/html.coffee +4 -3
  7. data/app/assets/javascripts/teabag/base/reporters/html/base_view.coffee +49 -0
  8. data/app/assets/javascripts/teabag/base/reporters/html/suite_view.coffee +1 -1
  9. data/app/assets/javascripts/teabag/base/runner.coffee +10 -0
  10. data/app/assets/javascripts/teabag/base/teabag.coffee +15 -1
  11. data/app/assets/javascripts/teabag/jasmine.coffee +53 -5
  12. data/app/assets/javascripts/teabag/mocha.coffee +51 -5
  13. data/app/assets/javascripts/teabag/mocha/reporters/console.coffee +3 -2
  14. data/app/assets/javascripts/teabag/qunit.coffee +61 -0
  15. data/app/assets/javascripts/teabag/qunit/reporters/console.coffee +25 -0
  16. data/app/assets/javascripts/teabag/qunit/reporters/html.coffee +80 -0
  17. data/app/helpers/teabag/spec_helper.rb +6 -14
  18. data/lib/generators/teabag/install/templates/initializer.rb +2 -1
  19. data/lib/teabag/configuration.rb +15 -4
  20. data/lib/teabag/console.rb +5 -11
  21. data/lib/teabag/drivers/base_driver.rb +10 -0
  22. data/lib/teabag/{phantomjs → drivers/phantomjs}/runner.coffee +0 -0
  23. data/lib/teabag/drivers/phantomjs_driver.rb +25 -0
  24. data/lib/teabag/drivers/selenium_driver.rb +29 -0
  25. data/lib/teabag/formatters/base_formatter.rb +4 -2
  26. data/lib/teabag/formatters/{progress_formatter.rb → dot_formatter.rb} +5 -5
  27. data/lib/teabag/formatters/swayze_or_oprah_formatter.rb +1 -1
  28. data/lib/teabag/formatters/tap_y_formatter.rb +85 -0
  29. data/lib/teabag/result.rb +18 -29
  30. data/lib/teabag/runner.rb +2 -2
  31. data/lib/teabag/version.rb +1 -1
  32. data/spec/dummy/config/initializers/teabag.rb +6 -0
  33. data/spec/dummy/log/development.log +87684 -0
  34. data/spec/dummy/log/test.log +556 -0
  35. data/spec/dummy/tmp/cache/assets/C13/B50/sprockets%2F431452d41e5087d2211162d23c63789b +0 -0
  36. data/spec/dummy/tmp/cache/assets/C18/F90/sprockets%2F369a3f720404378b4162541fd432742d +0 -0
  37. data/spec/dummy/tmp/cache/assets/C2B/5D0/sprockets%2F98606f6051a5fc71379af24236793353 +0 -0
  38. data/spec/dummy/tmp/cache/assets/C4E/9B0/sprockets%2Fa807397434c9262c3d62da3e91152184 +0 -0
  39. data/spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 +0 -0
  40. data/spec/dummy/tmp/cache/assets/C72/150/sprockets%2F4194031b4b51b6422c14ac697e3455e5 +0 -0
  41. data/spec/dummy/tmp/cache/assets/C75/D50/sprockets%2F5302968a40e08d2c011aa38666d273f6 +0 -0
  42. data/spec/dummy/tmp/cache/assets/C78/6B0/sprockets%2F173640f631a07f48c900a9c2923c825b +0 -0
  43. data/spec/dummy/tmp/cache/assets/C78/EF0/sprockets%2F65f827a4a5337d05d037845161b41ab8 +0 -0
  44. data/spec/dummy/tmp/cache/assets/C78/F80/sprockets%2F9161622ddd251097a4ab816b8220984c +0 -0
  45. data/spec/dummy/tmp/cache/assets/C7A/EC0/sprockets%2F5c16e4214f5662e1b27932a57c43491b +0 -0
  46. data/spec/dummy/tmp/cache/assets/C7C/AC0/sprockets%2F29124be1160817c61bb4878894b2ba55 +0 -0
  47. data/spec/dummy/tmp/cache/assets/C80/F70/sprockets%2Fe5c9811902c221828ea647978f000be3 +0 -0
  48. data/spec/dummy/tmp/cache/assets/C87/2C0/sprockets%2F60f61c07481249fc7922664609fcae52 +0 -0
  49. data/spec/dummy/tmp/cache/assets/C89/700/sprockets%2F259935a7704fef0069303ea63fa89408 +0 -0
  50. data/spec/dummy/tmp/cache/assets/C8A/460/sprockets%2F77bffd9959420103906722b404ae8d59 +0 -0
  51. data/spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 +0 -0
  52. data/spec/dummy/tmp/cache/assets/C97/430/sprockets%2Fc049582fd1c9178ff983323f75326f64 +0 -0
  53. data/spec/dummy/tmp/cache/assets/CA2/F50/sprockets%2F86094c5d1b6399d614b0771a3a0a45b0 +0 -0
  54. data/spec/dummy/tmp/cache/assets/CA6/2F0/sprockets%2F20040c18b672e4c4d2731a2a929d8b97 +0 -0
  55. data/spec/dummy/tmp/cache/assets/CA9/C40/sprockets%2F932b7e2cd1e067289ab51190800814df +0 -0
  56. data/spec/dummy/tmp/cache/assets/CAA/0C0/sprockets%2F057b0ce384f16d9202ae84473436cc35 +0 -0
  57. data/spec/dummy/tmp/cache/assets/CAD/410/sprockets%2F651414e5c7e86f05c5108dc71626b25c +0 -0
  58. data/spec/dummy/tmp/cache/assets/CB4/6A0/sprockets%2F7373c9de844b711519cb49c4f1b16822 +0 -0
  59. data/spec/dummy/tmp/cache/assets/CBB/FA0/sprockets%2F74922109263bdc965b2e9567eec6d154 +0 -0
  60. data/spec/dummy/tmp/cache/assets/CBF/630/sprockets%2F707d2db81468088470d476abff35388d +0 -0
  61. data/spec/dummy/tmp/cache/assets/CCE/C50/sprockets%2Fe12774c2fea852112414bb379a71f31a +0 -0
  62. data/spec/dummy/tmp/cache/assets/CD3/460/sprockets%2F7f3f6802b0b309ed142d0b671c9640c4 +0 -0
  63. data/spec/dummy/tmp/cache/assets/CD9/DD0/sprockets%2Fe5774759168a731da1c1149ecf0e1b03 +0 -0
  64. data/spec/dummy/tmp/cache/assets/CDB/630/sprockets%2Ffd1626fe1016c81d57217f7f80c4370a +0 -0
  65. data/spec/dummy/tmp/cache/assets/CE0/090/sprockets%2F48d5d35ae87d0723318b8bc257fa2237 +0 -0
  66. data/spec/dummy/tmp/cache/assets/CE1/250/sprockets%2Ffdc680a0d4383d37910e549ca96f5303 +0 -0
  67. data/spec/dummy/tmp/cache/assets/CE1/730/sprockets%2Fa1678837061e18d7aca0286c07acf676 +0 -0
  68. data/spec/dummy/tmp/cache/assets/CE2/190/sprockets%2F0183b0f4e9f302b8677a5e31c45c89c5 +0 -0
  69. data/spec/dummy/tmp/cache/assets/CE3/1F0/sprockets%2Fe69a515d3a9d14c669be8871012a7d07 +0 -0
  70. data/spec/dummy/tmp/cache/assets/CE6/270/sprockets%2F2c98152560d18470fec8cf4c6829b4d0 +0 -0
  71. data/spec/dummy/tmp/cache/assets/CE6/7C0/sprockets%2Fa03a2c86ce6724be8542295e1cf24798 +0 -0
  72. data/spec/dummy/tmp/cache/assets/CE7/600/sprockets%2F7656791c172a6037cfffe2a226291c9e +0 -0
  73. data/spec/dummy/tmp/cache/assets/CE7/A60/sprockets%2Ff58eee249aa167d23f8220087bb46684 +0 -0
  74. data/spec/dummy/tmp/cache/assets/CE9/9E0/sprockets%2F135480d497ed7e4884462dc0ef0b80d7 +0 -0
  75. data/spec/dummy/tmp/cache/assets/CEB/090/sprockets%2F55dcd7ace406b77208c380d496e37864 +0 -0
  76. data/spec/dummy/tmp/cache/assets/CEB/680/sprockets%2F67f0794ef8c0576d5c7da34f4437305a +0 -0
  77. data/spec/dummy/tmp/cache/assets/CEB/B40/sprockets%2F1150bf8d912aa100a132251eefaf6045 +0 -0
  78. data/spec/dummy/tmp/cache/assets/CEC/360/sprockets%2F264b79dde726b36d63fee272a0609469 +0 -0
  79. data/spec/dummy/tmp/cache/assets/CF4/6F0/sprockets%2Fed96f92571224b862b84d7078b86ded3 +0 -0
  80. data/spec/dummy/tmp/cache/assets/CF7/F10/sprockets%2F8c45854ebd195b52cc42bf3f99996336 +0 -0
  81. data/spec/dummy/tmp/cache/assets/CF8/780/sprockets%2F8845b81ff27cdb57c835836c9f91a265 +0 -0
  82. data/spec/dummy/tmp/cache/assets/CFB/210/sprockets%2F9104695bfbf9a9d4b94382e6e90487a9 +0 -0
  83. data/spec/dummy/tmp/cache/assets/CFC/380/sprockets%2Fa7443cbd671446a589867dd5f4a4f989 +0 -0
  84. data/spec/dummy/tmp/cache/assets/D00/110/sprockets%2F6a6353b7723a8b21708e0fbfe04bd422 +0 -0
  85. data/spec/dummy/tmp/cache/assets/D00/F60/sprockets%2F42e279b52511c47d26c0adb125fd04e8 +0 -0
  86. data/spec/dummy/tmp/cache/assets/D03/630/sprockets%2F5d8da32dba6a7be70426a1d554773701 +0 -0
  87. data/spec/dummy/tmp/cache/assets/D04/170/sprockets%2F76ab1dc02e6c7618852708a1e05a2df3 +0 -0
  88. data/spec/dummy/tmp/cache/assets/D04/480/sprockets%2F8bd8f10500b21d2f9d94e4cd1401c936 +0 -0
  89. data/spec/dummy/tmp/cache/assets/D05/8D0/sprockets%2F319f8f235f452343f1ebf03cb262d23d +0 -0
  90. data/spec/dummy/tmp/cache/assets/D09/BF0/sprockets%2F9e6bca5d26f50d9484385d51ba04312c +0 -0
  91. data/spec/dummy/tmp/cache/assets/D0B/740/sprockets%2F781d3a2f0449451e9f35c5b0e3e2df41 +0 -0
  92. data/spec/dummy/tmp/cache/assets/D0E/570/sprockets%2F90fe371bf8091e88a712124d9cdae260 +0 -0
  93. data/spec/dummy/tmp/cache/assets/D11/D60/sprockets%2F06d6413e059dbac9a62155639ce88d2c +0 -0
  94. data/spec/dummy/tmp/cache/assets/D11/F80/sprockets%2F48961522f6cd1a15f2fe6e25f1b37a75 +0 -0
  95. data/spec/dummy/tmp/cache/assets/D12/F40/sprockets%2Fb6f95541e256c15909e0a5a5fbf2a359 +0 -0
  96. data/spec/dummy/tmp/cache/assets/D15/750/sprockets%2F8effdd3e668a4036260a3e370f3b6657 +0 -0
  97. data/spec/dummy/tmp/cache/assets/D17/710/sprockets%2Ffa49fb6823d466e79a195e0cd71340c5 +0 -0
  98. data/spec/dummy/tmp/cache/assets/D18/AF0/sprockets%2F8f572049bd1b0a6f1eb3d27979c9544c +0 -0
  99. data/spec/dummy/tmp/cache/assets/D1A/D30/sprockets%2F815a5177e9edba0c5c996182ef1b3675 +0 -0
  100. data/spec/dummy/tmp/cache/assets/D1B/730/sprockets%2Fcf6ce779d043d29aae915f599a413380 +0 -0
  101. data/spec/dummy/tmp/cache/assets/D1D/560/sprockets%2F1ca784ee7ba1922465147e7f8963eae5 +0 -0
  102. data/spec/dummy/tmp/cache/assets/D21/AD0/sprockets%2Fd471d7f687f61341d8b19efc41f39e44 +0 -0
  103. data/spec/dummy/tmp/cache/assets/D22/D70/sprockets%2Fe86ae12aa97067ed78aa94489484ec16 +0 -0
  104. data/spec/dummy/tmp/cache/assets/D2F/810/sprockets%2F1a2674b7dac8ff403c23a570475ace04 +0 -0
  105. data/spec/dummy/tmp/cache/assets/D30/480/sprockets%2Feb011f46c64dbefb1f7e21329644c240 +0 -0
  106. data/spec/dummy/tmp/cache/assets/D31/9C0/sprockets%2Fbd102a4f5a4985c3519dd6ab0295a1c6 +0 -0
  107. data/spec/dummy/tmp/cache/assets/D34/920/sprockets%2Ff234dd736ae50902ba074c526ca8f0c8 +0 -0
  108. data/spec/dummy/tmp/cache/assets/D35/7C0/sprockets%2Ff536a2606eaf7d542c0985104cb62baf +0 -0
  109. data/spec/dummy/tmp/cache/assets/D35/F00/sprockets%2F8e7f22358123b7eb5e21d17f442ce0ac +0 -0
  110. data/spec/dummy/tmp/cache/assets/D37/810/sprockets%2F99de576ce6ad42b5c0843fc21c2025b2 +0 -0
  111. data/spec/dummy/tmp/cache/assets/D37/FF0/sprockets%2F96841ca4cfae32c515077f3f5fc303b2 +0 -0
  112. data/spec/dummy/tmp/cache/assets/D39/BE0/sprockets%2Fdb727091cf3e4b4f6126c48b6063ef0b +0 -0
  113. data/spec/dummy/tmp/cache/assets/D3C/840/sprockets%2Fc6202ec91d567a85bd3d46dc43ea9108 +0 -0
  114. data/spec/dummy/tmp/cache/assets/D3D/EC0/sprockets%2F1aa82cb99ef076aea10d472b30a58979 +0 -0
  115. data/spec/dummy/tmp/cache/assets/D3F/3A0/sprockets%2F1b3734b358a405ca6f92455db8e4b5ff +0 -0
  116. data/spec/dummy/tmp/cache/assets/D45/C30/sprockets%2Fcc744877558178a3adb77c441cadce70 +0 -0
  117. data/spec/dummy/tmp/cache/assets/D48/160/sprockets%2F32bae66fd65ce3643efb543182f2e885 +0 -0
  118. data/spec/dummy/tmp/cache/assets/D49/1F0/sprockets%2F773b56f87127c6605e7d1d3faf2b6af6 +0 -0
  119. data/spec/dummy/tmp/cache/assets/D49/A10/sprockets%2Fc4656bd995a6f297c26d19b13aadb963 +0 -0
  120. data/spec/dummy/tmp/cache/assets/D4A/A50/sprockets%2Fb95795be8b937dab770541e27ddb2e70 +0 -0
  121. data/spec/dummy/tmp/cache/assets/D4C/840/sprockets%2F7732c94884c24e764f109ce2deb2a9ed +0 -0
  122. data/spec/dummy/tmp/cache/assets/D50/D70/sprockets%2Fe2a3e6c95b11e0801a4eebae3a026026 +0 -0
  123. data/spec/dummy/tmp/cache/assets/D51/400/sprockets%2Ff5e433d8a31e80985b75ce598de236be +0 -0
  124. data/spec/dummy/tmp/cache/assets/D58/870/sprockets%2F3cef1ff075a050004b74ffa13c8c4f02 +0 -0
  125. data/spec/dummy/tmp/cache/assets/D5B/9D0/sprockets%2F9c18c0aa5bbe1b323c5022c98aa09f29 +0 -0
  126. data/spec/dummy/tmp/cache/assets/D5B/E60/sprockets%2F167c229432f74a17b4c6a07bbb19aacb +0 -0
  127. data/spec/dummy/tmp/cache/assets/D5C/710/sprockets%2F9427d05cee2caa721241a25a9af1d08f +0 -0
  128. data/spec/dummy/tmp/cache/assets/D5C/CC0/sprockets%2Faa8bf6de211f2765b0a26f112b971f0c +0 -0
  129. data/spec/dummy/tmp/cache/assets/D5E/FA0/sprockets%2Fc81c371ae2d61a6aa1708262fba79e0d +0 -0
  130. data/spec/dummy/tmp/cache/assets/D60/060/sprockets%2Fe8a6ac51dd42491eaa2f9130c1629eb2 +0 -0
  131. data/spec/dummy/tmp/cache/assets/D61/1F0/sprockets%2F0c7a6176d2fc4db00bb9a74d36380fe1 +0 -0
  132. data/spec/dummy/tmp/cache/assets/D61/BD0/sprockets%2Ff96fcad988ca7fea975e538c27188605 +0 -0
  133. data/spec/dummy/tmp/cache/assets/D65/AD0/sprockets%2Fcc53fff930eaf306c15c4568cb265c00 +0 -0
  134. data/spec/dummy/tmp/cache/assets/D67/030/sprockets%2Fb8b36ba6104c8dbe6297b4e61e6d33b1 +0 -0
  135. data/spec/dummy/tmp/cache/assets/D67/BC0/sprockets%2F35d2c2b45981ade5a2db2a9c7f37a615 +0 -0
  136. data/spec/dummy/tmp/cache/assets/D69/F90/sprockets%2F6a0795b7b38bd7e6142cd1b88211dade +0 -0
  137. data/spec/dummy/tmp/cache/assets/D6A/950/sprockets%2F429b1806cb7580ebf29f9a12c33cbea6 +0 -0
  138. data/spec/dummy/tmp/cache/assets/D6C/9C0/sprockets%2Fd66bdf546164ba223e20f56b5591ddfd +0 -0
  139. data/spec/dummy/tmp/cache/assets/D6D/530/sprockets%2F8d52dee91bff01a8a2306d8a7c9152a9 +0 -0
  140. data/spec/dummy/tmp/cache/assets/D6D/DA0/sprockets%2Fac936bf40b42227a2bf9d474ae9ec149 +0 -0
  141. data/spec/dummy/tmp/cache/assets/D6F/310/sprockets%2F624b651d37f7ec0c563c446fbf8afb32 +0 -0
  142. data/spec/dummy/tmp/cache/assets/D71/A70/sprockets%2F4f10f5dd56c8a3ff78c460bbe3723a39 +0 -0
  143. data/spec/dummy/tmp/cache/assets/D72/C10/sprockets%2Ffbdb5250837c5cb856f464eb2cb3388b +0 -0
  144. data/spec/dummy/tmp/cache/assets/D73/5D0/sprockets%2F5c8608f3e25d077fa3df8cd32b50c37f +0 -0
  145. data/spec/dummy/tmp/cache/assets/D73/C00/sprockets%2F9cf4bfb486e4ab461e3f275a3d974c30 +0 -0
  146. data/spec/dummy/tmp/cache/assets/D77/B30/sprockets%2F946cf2f17c7eb41037f9ee08ad67ec40 +0 -0
  147. data/spec/dummy/tmp/cache/assets/D78/2F0/sprockets%2F3c61f8915b8f717b1de788e6ecad122c +0 -0
  148. data/spec/dummy/tmp/cache/assets/D78/870/sprockets%2F8f3a7d4fcd104fa8e47f552f6630a49e +0 -0
  149. data/spec/dummy/tmp/cache/assets/D7E/C10/sprockets%2F747c98c3cc7494a62dd882752adffb2b +0 -0
  150. data/spec/dummy/tmp/cache/assets/D7F/6C0/sprockets%2F77fe714bfff7e409a9d838cdf126700c +0 -0
  151. data/spec/dummy/tmp/cache/assets/D84/560/sprockets%2Ff09b671d3f5f8a48d7fa28e2c59ca389 +0 -0
  152. data/spec/dummy/tmp/cache/assets/D85/5D0/sprockets%2Fde362e334a475cfca1a30fa5b713b43a +0 -0
  153. data/spec/dummy/tmp/cache/assets/D8C/520/sprockets%2F221cd58a042baac534d27e4cfedc1188 +0 -0
  154. data/spec/dummy/tmp/cache/assets/D92/C00/sprockets%2F63c8bb5e2b2d9db4a2ed16f056a234c6 +0 -0
  155. data/spec/dummy/tmp/cache/assets/D97/520/sprockets%2Fea2442ae4caddb758dfb1964c601b476 +0 -0
  156. data/spec/dummy/tmp/cache/assets/D9C/510/sprockets%2Fab9bab3574dac2d1681189debb7d8255 +0 -0
  157. data/spec/dummy/tmp/cache/assets/D9D/440/sprockets%2F869f9acc13b88cf15a31d24a0ac3f6f6 +0 -0
  158. data/spec/dummy/tmp/cache/assets/D9E/CB0/sprockets%2Ff0efe0ab6bd753a8bb4481e46243d77f +0 -0
  159. data/spec/dummy/tmp/cache/assets/DA0/330/sprockets%2Fcbbb4de706387d50f48a72ee6c9c1b80 +0 -0
  160. data/spec/dummy/tmp/cache/assets/DA5/0A0/sprockets%2F7a4b5928cec69ab65afff309a04d6b47 +0 -0
  161. data/spec/dummy/tmp/cache/assets/DA6/D80/sprockets%2F8702dce2e6b9879a6add309e92ace2f0 +0 -0
  162. data/spec/dummy/tmp/cache/assets/DA8/C50/sprockets%2F0810627fddce930a399fc60d3be97fed +0 -0
  163. data/spec/dummy/tmp/cache/assets/DAA/1E0/sprockets%2F412dd3bd3026759a3f6ffe8cf9e7b93a +0 -0
  164. data/spec/dummy/tmp/cache/assets/DAA/2B0/sprockets%2Fe0c5d93fa08d139e198bfe47cd42b99a +0 -0
  165. data/spec/dummy/tmp/cache/assets/DAE/4E0/sprockets%2F88cc3ab99c608879dd56164dbcc2ccb7 +0 -0
  166. data/spec/dummy/tmp/cache/assets/DAE/6C0/sprockets%2F77c7a8676aeefa73156c55dfcf51cc46 +0 -0
  167. data/spec/dummy/tmp/cache/assets/DAF/5B0/sprockets%2F780e81d97e4eefcce73e0b82a5b1859d +0 -0
  168. data/spec/dummy/tmp/cache/assets/DB3/5D0/sprockets%2Fce1d4d75832c9bdeafd869f6f7b61725 +0 -0
  169. data/spec/dummy/tmp/cache/assets/DB5/040/sprockets%2F9a9da5df88713663b9fbc945facca891 +0 -0
  170. data/spec/dummy/tmp/cache/assets/DB5/860/sprockets%2Facf25fab3016425a0e03c9d190fd4eac +0 -0
  171. data/spec/dummy/tmp/cache/assets/DB9/220/sprockets%2Fd2dc4f59e70e73984997ffca8ad7f4a0 +0 -0
  172. data/spec/dummy/tmp/cache/assets/DC3/230/sprockets%2Fdf52e72eb73be91eccc60182191aed0b +0 -0
  173. data/spec/dummy/tmp/cache/assets/DC3/AC0/sprockets%2Fe29911eb34fdf4b710dd0d2c2cf24bc9 +0 -0
  174. data/spec/dummy/tmp/cache/assets/DC4/860/sprockets%2Fa01a3cf460ff15daae0f928d0f85f52e +0 -0
  175. data/spec/dummy/tmp/cache/assets/DC7/A10/sprockets%2F84a8af0fcbf401864e1ae5bf092cba94 +0 -0
  176. data/spec/dummy/tmp/cache/assets/DCB/620/sprockets%2F27a68cf9fe11fb1b6326d11eba7e76cb +0 -0
  177. data/spec/dummy/tmp/cache/assets/DCD/EB0/sprockets%2F4f77f509126ecbced7ea2a5ab290c8d4 +0 -0
  178. data/spec/dummy/tmp/cache/assets/DE3/6C0/sprockets%2F51c550cc1b3b021aa9aede66a5a36aff +0 -0
  179. data/spec/dummy/tmp/cache/assets/DE4/140/sprockets%2F139e4ab85d1aacb22c115fa136afdc8a +0 -0
  180. data/spec/dummy/tmp/cache/assets/DEB/110/sprockets%2F2dbdab0ce5babca645cdb5780004f875 +0 -0
  181. data/spec/dummy/tmp/cache/assets/DF1/1B0/sprockets%2F2b1bc202f9a338942edbccb2cfef0d67 +0 -0
  182. data/spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 +0 -0
  183. data/spec/dummy/tmp/cache/assets/DF7/E10/sprockets%2F25e4253aba9a9adcefb72552fb1ff0c8 +0 -0
  184. data/spec/dummy/tmp/cache/assets/DF9/AD0/sprockets%2Fc700afd7cee3fe9d7ff8352b213b2c4a +0 -0
  185. data/spec/dummy/tmp/cache/assets/DFC/C20/sprockets%2Fd9178ad7e3b401c9fceafd64ea2b50d6 +0 -0
  186. data/spec/dummy/tmp/cache/assets/DFC/C30/sprockets%2Fb50a07cb30b0bd0eec8e98e5de79d65d +0 -0
  187. data/spec/dummy/tmp/cache/assets/E02/6E0/sprockets%2F63d6a5cdb8cefa64ef76b5c6e0fd3720 +0 -0
  188. data/spec/dummy/tmp/cache/assets/E08/5A0/sprockets%2Fe7148db8eea925c3c9f1ee340d53ceff +0 -0
  189. data/spec/dummy/tmp/cache/assets/E08/BB0/sprockets%2Fefac99af1af28543aef6fb607faa4973 +0 -0
  190. data/spec/dummy/tmp/cache/assets/E08/F20/sprockets%2F4fc5cdcd6974efe7adfe809b30bd6513 +0 -0
  191. data/spec/dummy/tmp/cache/assets/E16/D30/sprockets%2Fd69469e6e7439baacd8df989c0fdacc2 +0 -0
  192. data/spec/dummy/tmp/cache/assets/E17/EF0/sprockets%2Fa291ad64a26afd055dfadabbdf03f154 +0 -0
  193. data/spec/dummy/tmp/cache/assets/E41/250/sprockets%2F97cf8fe3d7ffaff076f655aefb36da03 +0 -0
  194. data/spec/dummy/tmp/cache/assets/E6E/260/sprockets%2Fd9f8ab8b91ef582cc6c99a3ba0dedfe6 +0 -0
  195. data/spec/dummy/tmp/cache/assets/F79/360/sprockets%2F0ce035fefee5ebdabc8efabfbdbd6ee4 +0 -0
  196. data/spec/javascripts/teabag/base/reporters/console_spec.coffee +69 -42
  197. data/spec/javascripts/teabag/base/reporters/html/base_view_spec.coffee +88 -0
  198. data/spec/javascripts/teabag/base/reporters/html_spec.coffee +218 -218
  199. data/spec/javascripts/teabag/base/runner_spec.coffee +22 -0
  200. data/spec/javascripts/teabag/base/teabag_spec.coffee +1 -1
  201. data/spec/javascripts/teabag/jasmine/models_jspec.coffee +101 -0
  202. data/spec/javascripts/teabag/jasmine/runner_jspec.coffee +1 -1
  203. data/spec/javascripts/teabag/mocha/models_mspec.coffee +95 -0
  204. data/spec/javascripts/teabag/mocha/reporters/console_mspec.coffee +4 -0
  205. data/spec/javascripts/teabag/mocha/runner_mspec.coffee +7 -7
  206. data/spec/javascripts/teabag/phantomjs/runner_spec.coffee +5 -5
  207. data/spec/teabag/configuration_spec.rb +2 -2
  208. data/spec/teabag/console_spec.rb +5 -17
  209. data/spec/teabag/drivers/phantomjs_driver_spec.rb +29 -0
  210. data/spec/teabag/drivers/selenium_driver_spec.rb +60 -0
  211. data/spec/teabag/formatters/{progress_formatter_spec.rb → dot_formatter_spec.rb} +14 -14
  212. data/spec/teabag/formatters/tap_y_formatter_spec.rb +190 -0
  213. data/spec/teabag/result_spec.rb +12 -42
  214. data/spec/teabag/runner_spec.rb +12 -6
  215. data/vendor/assets/javascripts/qunit-1.10.0.MIT.LICENSE +1 -0
  216. data/vendor/assets/javascripts/qunit-1.10.0.js +1977 -0
  217. metadata +161 -11
  218. data/app/assets/javascripts/teabag/base/reporters.coffee +0 -105
  219. data/spec/javascripts/teabag/base/reporters_spec.coffee +0 -267
data/README.md CHANGED
@@ -2,17 +2,19 @@ Teabag
2
2
  ======
3
3
  [![Build Status](https://travis-ci.org/modeset/teabag.png)](https://travis-ci.org/modeset/teabag)
4
4
 
5
- Teabag is a Javascript test runner built on top of Rails. It can run tests in the browser, or headlessly using PhantomJS.
5
+ Teabag is a Javascript test runner built on top of Rails. It can run tests in the browser, or headlessly using PhantomJS (default) or Selenium WebDriver.
6
6
 
7
- Ok, another test runner, right? Really? Yeah, that's a tough one, but we're pretty confident Teabag is the nicest one you'll find at the moment. And if you disagree, you can swing by our offices in Denver and we'll buy you a beer if you're so inclined.
7
+ Ok, another test runner, right? Really? Yeah, that's a tough one, but we're pretty confident Teabag is the nicest one you'll find at the moment. And if you disagree, you can swing by our offices in Denver and we'll buy you a beer if you're so inclined. And we'll probably fix whatever it is that you didn't like.
8
8
 
9
- The intention is to be the simplest but most complete Javascript testing solution for Rails, taking full advantage of the asset pipeline. It ships with support for both Jasmine and Mocha, and has custom reporters for both libraries.
9
+ The intention is to be the simplest but most complete Javascript testing solution for Rails, taking full advantage of the asset pipeline. It ships with support for Jasmine, Mocha and QUnit, and has custom reporters for each.
10
10
 
11
11
  We've just released Teabag, and we expect to be working on it for a while to get a glossy shine to everything, so check it out and let us know what you think. Feedback, ideas and pull requests would be awesome.
12
12
 
13
13
  ## Screenshots
14
14
  ### Running in the console
15
15
  ![Console Reporter](https://raw.github.com/modeset/teabag/master/screenshots/console-reporter.png)
16
+ ### Running in the console using [Tapout](https://github.com/rubyworks/tapout)
17
+ ![Console Reporter Tapout](https://raw.github.com/modeset/teabag/master/screenshots/console-reporter-tapout.png)
16
18
  ### Running in the browser
17
19
  ![Browser Reporter](https://raw.github.com/modeset/teabag/master/screenshots/html-reporter.png)
18
20
 
@@ -58,7 +60,7 @@ rails generate teabag:install
58
60
 
59
61
  The install generator will create a `spec/javascripts` directory for you. Teabag will automatically pick up any specs written in that folder named `[classname]_spec.(js|coffee|js.coffee)`.
60
62
 
61
- Let's write a basic class and spec in CoffeeScript using Jasmine (though you could just as easily use vanilla Javascript and/or Mocha). Create `spec/javascripts/calculator_spec.coffee` and put this in it:
63
+ Let's write a basic class and spec in CoffeeScript using Jasmine (though you could just as easily use vanilla Javascript). Create `spec/javascripts/calculator_spec.coffee` and put this in it:
62
64
 
63
65
  ```coffeescript
64
66
  #= require calculator
@@ -81,15 +83,8 @@ Run `rake teabag` - you should see your first failing spec.
81
83
  ```
82
84
  Failures:
83
85
 
84
- 1) calculator should add two numbers.
85
- Failure/Error: TypeError: 'undefined' is not a function
86
-
87
- Finished in 0.01600 seconds
88
- 1 example, 1 failure
89
-
90
- Failed examples:
91
-
92
- /teabag/default?grep=calculator%20should%20add%20two%20numbers.
86
+ 1) Calculator should add two numbers.
87
+ Failure/Error: TypeError: 'undefined' is not a function
93
88
  ```
94
89
 
95
90
  Now we just need make the test pass. Let's implement the `add` method on Calculator.
@@ -101,7 +96,7 @@ Now we just need make the test pass. Let's implement the `add` method on Calcula
101
96
 
102
97
  Run `rake teabag` again - that spec should now be passing!
103
98
 
104
- If you'd prefer, you can also run your tests in the browser. Fire up your Rails server and visit [localhost:3000/teabag](http://localhost:3000/teabag) to run the specs.
99
+ If you'd prefer, you can also run your tests in the browser. Fire up your Rails server and visit [localhost:3000/teabag](http://localhost:3000/teabag) to run the specs in whichever browser you want.
105
100
 
106
101
 
107
102
  ## Usage
@@ -136,7 +131,13 @@ rake teabag suite=my_fantastic_suite
136
131
 
137
132
  When a failure is encountered, a URL will be generated so you can pop open a browser and load a focused run to examine that specific failure.
138
133
 
139
- You can override a few configurations by using environment variables. `FAILS_FALSE=[true/false]` and `SUPPRESS_LOGS=[false/true]`. You can read more about these configuration directives below.
134
+ You can override a few configurations by using environment variables. `FAILS_FALSE=[true/false]`, `SUPPRESS_LOGS=[false/true]` and `FORMATTERS=tap_y`. You can read more about these configuration directives below.
135
+
136
+ Teabag has support for [tapout](https://github.com/rubyworks/tapout). You can use the tap_y formatter and pipe the results to tapout to use any of the reporters that tapout provides.
137
+
138
+ ```
139
+ rake teabag SUPPRESS_LOG=true FORMATTERS=tap_y | tapout progress
140
+ ```
140
141
 
141
142
  **Note:** By default the rake task runs within the development environment, but you can specify the environment using`RAILS_ENV=test rake teabag`. This is an asset compilation optimization, and to keep consistent with what you might see in the browser (since that's likely running in development).
142
143
 
@@ -149,7 +150,7 @@ task :default => [:spec, :teabag, :cucumber]
149
150
 
150
151
  ## Writing Specs
151
152
 
152
- Depending on what framework you use this can be slightly different. There's an expectation that you have a certain level of familiarity with the test framework that you're using. Right now we support [Jasmine](http://pivotal.github.com/jasmine/) and [Mocha](http://visionmedia.github.com/mocha/).
153
+ Depending on what framework you use this can be slightly different. There's an expectation that you have a certain level of familiarity with the test framework that you're using. Right now we support [Jasmine](http://pivotal.github.com/jasmine), [Mocha](http://visionmedia.github.com/mocha) and [QUnit](http://qunitjs.com).
153
154
 
154
155
  Since we have the asset pipeline at our fingertips you can feel free to use the `= require` directive throughout your specs and spec helpers.
155
156
 
@@ -167,16 +168,7 @@ describe("My great feature", function() {
167
168
  });
168
169
  ```
169
170
 
170
- Here's that same test written in CoffeeScript using Mocha + [expect.js](https://github.com/LearnBoost/expect.js) (Teabag ships with expect.js and other support libraries like [jasmine-jquery](https://github.com/velesin/jasmine-jquery).):
171
-
172
- ```coffeescript
173
- #= require jquery
174
- describe "My great feature", ->
175
-
176
- it "will change the world", ->
177
- expect(true).to.be(true)
178
- expect(jQuery).to.not.be(undefined)
179
- ```
171
+ Check out an example of a [Mocha Spec](https://github.com/modeset/teabag/wiki/Using-Mocha) and a [QUnit Test](https://github.com/modeset/teabag/wiki/Using-QUnit).
180
172
 
181
173
  ### Pending Specs
182
174
 
@@ -198,7 +190,7 @@ describe "My great feature", ->
198
190
  expect(true).to.be(false)
199
191
  ```
200
192
 
201
- If you're using one library and you want to take advantage of the things that that library provides you're completely free to do so, and this is provided as a suggestion. The Teabag reporters understand the techniques above and have specs for them.
193
+ If you're using one library and you want to take advantage of the things that that library provides you're completely free to do so, and this is provided as a suggestion. The Teabag reporters understand the techniques above and have specs for them. QUnit doesn't support specifying a test as pending.
202
194
 
203
195
  ### Fixtures
204
196
 
@@ -236,8 +228,6 @@ setTimeout(Teabag.execute, 1000) # defers execution for 1 second
236
228
 
237
229
  Teabag uses the concept of suites to group your tests at a high level. These suites are run in isolation from one another, and can have different configurations.
238
230
 
239
- When Teabag is run via the rake task, it will stop at any point that a suite fails, which allows you to create a hierarchy of suites -- crafting tiers of pass expectation. The fail_fast configuration lets you override this behavior -- useful for CI (more on setting these via env in the configuration section).
240
-
241
231
  You can define suites in the configuration, and for brevity `config` is the argument passed to the `Teabag.setup` block.
242
232
 
243
233
  When creating a suite definition you simply pass it a name and a block. The following example defines a suite named "my_suite". You can focus to just this suite by browsing to `/teabag/my_suite` or running the rake task with `suite=my_suite`.
@@ -262,14 +252,13 @@ It's worth noting that suites don't inherit from the default suite values, but i
262
252
 
263
253
  Teabag is happy to look for files for you, but you can disable this feature and maintain a manifest yourself. Since each suite can utilize a different spec helper, you can use these to create your own manifest of specs using the `= require` directive.
264
254
 
265
- Tell the suite that you don't want it to match any files, and then retuire files in your spec helper.
255
+ Tell the suite that you don't want it to match any files, and then require files in your spec helper.
266
256
 
267
257
  ```ruby
268
258
  config.suite do |suite|
269
259
  suite.matcher = nil
270
260
  suite.helper = "my_spec_manifest"
271
261
  end
272
-
273
262
  ```
274
263
 
275
264
  ### Suite Configuration Directives
@@ -278,13 +267,14 @@ end
278
267
 
279
268
  You can specify a file matcher for your specs, and the matching files will be automatically loaded when the suite is run. It's important that these files are serve-able from sprockets (aka the asset pipeline), and you'll receive an exception if they aren't.
280
269
 
270
+ **Note:** Set this to `nil` if you want to use your helper as a manifest.
271
+
281
272
  **default:** `"{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"`
282
273
 
283
- **Note:** set this to nil if you want to use your spec helper as a manifest.
284
274
 
285
275
  #### `helper`
286
276
 
287
- Each suite can load a different spec helper, which can in turn require additional files since this file is also served via the asset pipeline. This file is loaded before your specs are loaded -- so you can potentially include all of your spec files and use this as a manifest (if you set the matcher to nil).
277
+ Each suite can load a different spec helper, which can in turn require additional files. This file is loaded before your specs are loaded -- so you can use this as a manifest if you set the matcher to nil.
288
278
 
289
279
  **default:** `"spec_helper"`
290
280
 
@@ -292,13 +282,13 @@ Each suite can load a different spec helper, which can in turn require additiona
292
282
 
293
283
  These are the core Teabag javascripts. Spec files should not go here -- but if you want to add additional support for jasmine matchers, switch to mocha, include expectation libraries etc., this is a good place to do that.
294
284
 
295
- To use mocha switch this to: `"teabag-mocha"`
285
+ Available frameworks: teabag-jasmine, teabag-mocha, teabag-qunit
296
286
 
297
- To use the coffeescript source files: `"teabag/jasmine"` or `"teabag/mocha"`
287
+ **Note:** To use the CoffeeScript source files use `"teabag/jasmine"` etc.
298
288
 
299
- **default:** `["teabag-jasmine"]`
289
+ **Note:** It's strongly encouraged to include only the base files in the `javascripts` directive. You can require other support libraries in your spec helper, which makes them easier to change (you don't have to restart the server.)
300
290
 
301
- **Note:** It's strongly encouraged to only include the base files in the `javascripts` directive. You can require any other libraries you need in your spec helper. This makes it easier to maintain because you don't have to restart the server.
291
+ **default:** `["teabag-jasmine"]`
302
292
 
303
293
  #### `stylesheets`
304
294
 
@@ -329,7 +319,7 @@ The root path defaults to Rails.root if left nil, but if you're testing an engin
329
319
 
330
320
  These paths are appended to the rails assets paths (relative to config.root), and by default is an array that you can replace or add to.
331
321
 
332
- **default:** `["spec/javascripts", "spec/javascripts/stylesheets"]`
322
+ **default:** `["spec/javascripts", "spec/javascripts/stylesheets", "test/javascripts", "test/javascripts/stylesheets"]`
333
323
 
334
324
  #### `fixture_path`
335
325
 
@@ -343,15 +333,28 @@ Timeout for starting the server in seconds. If your server is slow to start you
343
333
 
344
334
  **default:** `20`
345
335
 
336
+ #### `driver`
337
+
338
+ Allows you to specify which driver you want to run your specs with -- Supports [PhantomJS](http://phantomjs.org/) and [Selenium Webdriver](http://seleniumhq.org/docs/03_webdriver.jsp). For more information about using Selenium WebDriver check this [wiki article](https://github.com/modeset/teabag/wiki/Using-Selenium-WebDriver).
339
+
340
+ Supported drivers: phantomjs, selenium
341
+
342
+ **Note:** Override this directive by running `rake teabag DRIVER=selenium`.
343
+
344
+ **default:** `"phantomjs"`
345
+
346
346
  #### `formatters`
347
347
 
348
- When running Teabag from the command line you can specify the formatters that it will use when displaying the results.
348
+ When running Teabag from the command line you can specify the formatters that it will use when displaying the results. Some formatters can be used together, and some are meant to be used by themselves. Play around, and see what you like.
349
+
350
+ Supported formatters: dot, tap_y, swayze_or_oprah
349
351
 
350
- **Note:** override this directive by running `rake teabag FORMATTERS=progress,other_formatter`
352
+ **Note:** Override this directive by running `rake teabag FORMATTERS=dot,other_formatter`.
351
353
 
352
- **default:** `"progress"`
354
+ **default:** `"dot"`
353
355
 
354
356
  #### `fail_fast`
357
+
355
358
  When you're running several suites it can be useful to make Teabag fail directly after any suite fails (not continuing on to the next suite), but in environments like CI this isn't as desirable. You can also configure this using the `FAIL_FAST` environment variable.
356
359
 
357
360
  **Note:** override this directive by running `rake teabag FAIL_FAST=false`
@@ -369,17 +372,11 @@ When you run Teabag from the console, it will pipe all console.log/debug/etc. ca
369
372
 
370
373
  ## Test Frameworks
371
374
 
372
- [Jasmine](http://pivotal.github.com/jasmine/) is a pretty big aspect of the default setup. We've been using Jasmine for a long time, and have been pretty happy with it. It lacks a few important things that could be in a test framework, so we've done a little bit of work to make that nicer. Like adding pending spec support.
375
+ [Jasmine](http://pivotal.github.com/jasmine) is used by default unless you specify otherwise. We've been using Jasmine for a long time, and have been pretty happy with it. It lacks a few important things that could be in a test framework, so we've done a little bit of work to make that nicer. Like adding pending spec support.
373
376
 
374
- [Mocha](http://visionmedia.github.com/mocha/) came up while we were working on Teabag -- we read up about it and thought it was a pretty awesome library with some really great approaches to some of the things that some of us browser types should consider more often, so we included it and added support for it. We encourage you to give it a try.
377
+ [Mocha](http://visionmedia.github.com/mocha) came up while we were working on Teabag -- we read up about it and thought it was a pretty awesome library with some really great approaches to some of the things that some of us browser types should consider more often, so we included it and added support for it. We encourage you to give it a try. Read more about [Using Mocha](https://github.com/modeset/teabag/wiki/Using-Mocha) with Teabag.
375
378
 
376
- By default Jasmine will be loaded, and to use Mocha just change your suite to include the Mocha javascript.
377
-
378
- ```ruby
379
- config.suite do |suite|
380
- suite.javascripts = ["teabag-mocha"]
381
- end
382
- ```
379
+ [QUnit](http://qunitjs.com) We're not sure about how many people use QUnit, but we like jQuery, and it wasn't that hard to add support for it, so we did. Show us some love if you're using it. Read more about [Using QUnit](https://github.com/modeset/teabag/wiki/Using-QUnit) with Teabag.
383
380
 
384
381
 
385
382
  ## Support Libraries
@@ -390,6 +387,14 @@ Because we know that testing usually requires more than just the test framework
390
387
  - [Sinon.JS](https://github.com/cjohansen/Sinon.JS) Great for stubbing / spying, and mocking Ajax (Mocha/Jasmine).
391
388
  - [expect.js](https://github.com/LearnBoost/expect.js) Minimalistic BDD assertion toolkit (Mocha).
392
389
 
390
+ You can require these files in your spec helper using:
391
+
392
+ ```javascript
393
+ //=require jasmine-jquery
394
+ //=require sinon
395
+ //=require expect
396
+ ```
397
+
393
398
 
394
399
  ## CI Support
395
400
 
@@ -400,18 +405,13 @@ More on this shortly....
400
405
 
401
406
  ## Roadmap
402
407
 
403
- So, there's lots of directions we can take the Teabag project, but we'll give it some time to see what people are looking for. Here's a short list of things that will probably happen.
408
+ So, there's lots of directions we can take the Teabag project, but we'll give it some time to see what people are looking for.
404
409
 
405
- - A Command Line Interface to allow running as `teabag spec/javascripts/calculator_spec.coffee` with proper arguments that will let you override configuration.
410
+ Check the [issues](https://github.com/modeset/teabag/issues) to see / discuss features that we're considering or are working on.
406
411
 
407
- - Add support for running Teabag using selenium.
408
-
409
- - Improve the user interface in the HTML reporter by adding a select for switching suites.
410
-
411
- - Ensure that the HTML reporter is working in IE6+ (give it a shot and let us know -- tested in IE9+).
412
-
413
- - Provide fixture support that works across frameworks.
414
412
 
415
413
  ## License
416
414
 
417
415
  Licensed under the [MIT License](http://creativecommons.org/licenses/MIT/)
416
+
417
+ All licenses for the [bundled Javascript libraries](https://github.com/modeset/teabag/tree/master/vendor/assets/javascripts) are included (all MIT).
@@ -2622,6 +2622,8 @@ jasmine.version_= {
2622
2622
 
2623
2623
  Teabag.console = window.console;
2624
2624
 
2625
+ Teabag.messages = [];
2626
+
2625
2627
  Teabag.execute = function() {
2626
2628
  if (this.defer) {
2627
2629
  this.defer = false;
@@ -2630,6 +2632,19 @@ jasmine.version_= {
2630
2632
  return new Teabag.Runner();
2631
2633
  };
2632
2634
 
2635
+ Teabag.log = function() {
2636
+ var _ref;
2637
+ this.messages.push(arguments[0]);
2638
+ return (_ref = this.console).log.apply(_ref, arguments);
2639
+ };
2640
+
2641
+ Teabag.getMessages = function() {
2642
+ var messages;
2643
+ messages = this.messages;
2644
+ this.messages = [];
2645
+ return messages;
2646
+ };
2647
+
2633
2648
  return Teabag;
2634
2649
 
2635
2650
  })();
@@ -2663,108 +2678,27 @@ jasmine.version_= {
2663
2678
  return params;
2664
2679
  };
2665
2680
 
2666
- Runner.prototype.setup = function() {};
2667
-
2668
- return Runner;
2669
-
2670
- })();
2671
-
2672
- }).call(this);
2673
- (function() {
2674
-
2675
- Teabag.Reporters.NormalizedSpec = (function() {
2676
-
2677
- function NormalizedSpec(spec) {
2678
- var _base, _base1;
2679
- this.spec = spec;
2680
- this.fullDescription = (typeof (_base = this.spec).getFullName === "function" ? _base.getFullName() : void 0) || this.spec.fullTitle();
2681
- this.description || (this.description = this.spec.description || this.spec.title);
2682
- this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
2683
- this.parent = this.spec.suite || this.spec.parent;
2684
- this.suiteName = (typeof (_base1 = this.parent).getFullName === "function" ? _base1.getFullName() : void 0) || this.parent.fullTitle();
2685
- this.viewId = this.spec.viewId;
2686
- this.pending = this.spec.pending;
2687
- }
2688
-
2689
- NormalizedSpec.prototype.errors = function() {
2690
- var item, _i, _len, _ref, _results;
2691
- if (this.spec.err) {
2692
- return [this.spec.err];
2693
- }
2694
- if (!this.spec.results) {
2695
- return [];
2696
- }
2697
- _ref = this.spec.results().getItems();
2698
- _results = [];
2699
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
2700
- item = _ref[_i];
2701
- if (item.passed()) {
2702
- continue;
2703
- }
2704
- _results.push({
2705
- message: item.message,
2706
- stack: item.trace.stack
2707
- });
2708
- }
2709
- return _results;
2710
- };
2711
-
2712
- NormalizedSpec.prototype.result = function() {
2713
- var results, skipped, status;
2714
- status = "failed";
2715
- if (this.spec.results) {
2716
- results = this.spec.results();
2717
- if (results.passed()) {
2718
- status = "passed";
2719
- }
2720
- skipped = results.skipped;
2681
+ Runner.prototype.getReporter = function() {
2682
+ if (this.params["reporter"]) {
2683
+ return Teabag.Reporters[this.params["reporter"]];
2721
2684
  } else {
2722
- if (this.spec.state === "passed" || this.spec.state === "skipped") {
2723
- status = "passed";
2724
- }
2725
- skipped = this.spec.state === "skipped";
2726
- }
2727
- if (this.spec.pending) {
2728
- status = "pending";
2729
- }
2730
- return {
2731
- status: status,
2732
- skipped: skipped
2733
- };
2734
- };
2735
-
2736
- return NormalizedSpec;
2737
-
2738
- })();
2739
-
2740
- Teabag.Reporters.NormalizedSuite = (function() {
2741
-
2742
- function NormalizedSuite(suite) {
2743
- var _base;
2744
- this.suite = suite;
2745
- this.fullDescription = (typeof (_base = this.suite).getFullName === "function" ? _base.getFullName() : void 0) || this.suite.fullTitle();
2746
- this.description = this.suite.description || this.suite.title;
2747
- this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
2748
- this.parent = this.getParent();
2749
- this.viewId = this.suite.viewId;
2750
- }
2751
-
2752
- NormalizedSuite.prototype.getParent = function() {
2753
- if (this.suite.parent) {
2754
- if (this.suite.parent.root) {
2755
- return null;
2685
+ if (window.navigator.userAgent.match(/PhantomJS/)) {
2686
+ return Teabag.Reporters.Console;
2756
2687
  } else {
2757
- return this.suite.parent;
2688
+ return Teabag.Reporters.HTML;
2758
2689
  }
2759
- } else {
2760
- return this.suite.parentSuite;
2761
2690
  }
2762
2691
  };
2763
2692
 
2764
- return NormalizedSuite;
2693
+ Runner.prototype.setup = function() {};
2694
+
2695
+ return Runner;
2765
2696
 
2766
2697
  })();
2767
2698
 
2699
+ }).call(this);
2700
+ (function() {
2701
+
2768
2702
  Teabag.Reporters.BaseView = (function() {
2769
2703
 
2770
2704
  function BaseView() {
@@ -2803,7 +2737,7 @@ jasmine.version_= {
2803
2737
  BaseView.prototype.setText = function(id, value) {
2804
2738
  var el;
2805
2739
  el = this.findEl(id);
2806
- return el.innerText = value;
2740
+ return el.innerHTML = value;
2807
2741
  };
2808
2742
 
2809
2743
  BaseView.prototype.setHtml = function(id, value, add) {
@@ -2836,93 +2770,6 @@ jasmine.version_= {
2836
2770
 
2837
2771
  })();
2838
2772
 
2839
- }).call(this);
2840
- (function() {
2841
- var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
2842
-
2843
- Teabag.Reporters.Console = (function() {
2844
-
2845
- function Console() {
2846
- this.reportRunnerResults = __bind(this.reportRunnerResults, this);
2847
- this.start = new Teabag.Date().getTime();
2848
- }
2849
-
2850
- Console.prototype.reportSpecResults = function(spec) {
2851
- var result;
2852
- this.spec = new Teabag.Reporters.NormalizedSpec(spec);
2853
- result = this.spec.result();
2854
- switch (result.status) {
2855
- case "pending":
2856
- return this.trackPending();
2857
- case "failed":
2858
- return this.trackFailure();
2859
- default:
2860
- return this.log({
2861
- type: "spec",
2862
- suite: this.spec.suiteName,
2863
- spec: this.spec.description,
2864
- status: result.status,
2865
- skipped: result.skipped,
2866
- full_description: this.spec.fullDescription
2867
- });
2868
- }
2869
- };
2870
-
2871
- Console.prototype.trackPending = function() {
2872
- var result;
2873
- result = this.spec.result();
2874
- return this.log({
2875
- type: "spec",
2876
- suite: this.spec.suiteName,
2877
- spec: this.spec.description,
2878
- status: result.status,
2879
- skipped: result.skipped,
2880
- full_description: this.spec.fullDescription
2881
- });
2882
- };
2883
-
2884
- Console.prototype.trackFailure = function() {
2885
- var error, result, _i, _len, _ref, _results;
2886
- result = this.spec.result();
2887
- _ref = this.spec.errors();
2888
- _results = [];
2889
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
2890
- error = _ref[_i];
2891
- _results.push(this.log({
2892
- type: "spec",
2893
- suite: this.spec.suiteName,
2894
- spec: this.spec.description,
2895
- status: result.status,
2896
- skipped: result.skipped,
2897
- full_description: this.spec.fullDescription,
2898
- link: this.spec.link,
2899
- message: error.message,
2900
- trace: error.stack || error.message || "Stack Trace Unavailable"
2901
- }));
2902
- }
2903
- return _results;
2904
- };
2905
-
2906
- Console.prototype.reportRunnerResults = function() {
2907
- this.log({
2908
- type: "results",
2909
- elapsed: ((new Teabag.Date().getTime() - this.start) / 1000).toFixed(5)
2910
- });
2911
- return Teabag.finished = true;
2912
- };
2913
-
2914
- Console.prototype.log = function(obj) {
2915
- if (obj == null) {
2916
- obj = {};
2917
- }
2918
- obj["_teabag"] = true;
2919
- return Teabag.console.log(JSON.stringify(obj));
2920
- };
2921
-
2922
- return Console;
2923
-
2924
- })();
2925
-
2926
2773
  }).call(this);
2927
2774
  (function() {
2928
2775
  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
@@ -2989,7 +2836,7 @@ jasmine.version_= {
2989
2836
  };
2990
2837
 
2991
2838
  HTML.prototype.reportSpecStarting = function(spec) {
2992
- spec = new Teabag.Reporters.NormalizedSpec(spec);
2839
+ spec = new Teabag.Spec(spec);
2993
2840
  if (this.config["build-full-report"]) {
2994
2841
  this.reportView = new Teabag.Reporters.HTML.SpecView(spec, this);
2995
2842
  }
@@ -3033,7 +2880,7 @@ jasmine.version_= {
3033
2880
 
3034
2881
  HTML.prototype.updateStatus = function(spec) {
3035
2882
  var elapsed, result, _ref, _ref1;
3036
- spec = new Teabag.Reporters.NormalizedSpec(spec);
2883
+ spec = new Teabag.Spec(spec);
3037
2884
  result = spec.result();
3038
2885
  if (result.skipped || result.status === "pending") {
3039
2886
  this.updateStat("skipped", this.total.skipped += 1);
@@ -3117,7 +2964,7 @@ jasmine.version_= {
3117
2964
  } else {
3118
2965
  date = new Teabag.Date();
3119
2966
  date.setDate(date.getDate() + 365);
3120
- return document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; path=/; expires=" + (date.toUTCString()) + ";";
2967
+ return document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; path=\"/\"; expires=" + (date.toUTCString()) + ";";
3121
2968
  }
3122
2969
  };
3123
2970
 
@@ -3359,7 +3206,7 @@ jasmine.version_= {
3359
3206
  this.views = this.reporter.views;
3360
3207
  this.suite.viewId = viewId += 1;
3361
3208
  this.views.suites[this.suite.viewId] = this;
3362
- this.suite = new Teabag.Reporters.NormalizedSuite(suite);
3209
+ this.suite = new Teabag.Suite(suite);
3363
3210
  SuiteView.__super__.constructor.apply(this, arguments);
3364
3211
  }
3365
3212
 
@@ -3407,6 +3254,119 @@ jasmine.version_= {
3407
3254
 
3408
3255
  })(Teabag.Reporters.BaseView);
3409
3256
 
3257
+ }).call(this);
3258
+ (function() {
3259
+ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
3260
+
3261
+ Teabag.Reporters.Console = (function() {
3262
+
3263
+ function Console() {
3264
+ this.reportRunnerResults = __bind(this.reportRunnerResults, this);
3265
+ this.start = new Teabag.Date();
3266
+ this.suites = {};
3267
+ }
3268
+
3269
+ Console.prototype.reportRunnerStarting = function(runner) {
3270
+ return this.log({
3271
+ type: "runner",
3272
+ total: runner.total || runner.specs().length,
3273
+ start: JSON.parse(JSON.stringify(this.start))
3274
+ });
3275
+ };
3276
+
3277
+ Console.prototype.reportSuites = function() {
3278
+ var index, suite, _i, _len, _ref, _results;
3279
+ _ref = this.spec.getParents();
3280
+ _results = [];
3281
+ for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
3282
+ suite = _ref[index];
3283
+ if (this.suites[suite.fullDescription]) {
3284
+ continue;
3285
+ }
3286
+ this.suites[suite.fullDescription] = true;
3287
+ _results.push(this.log({
3288
+ type: "suite",
3289
+ label: suite.description,
3290
+ level: index
3291
+ }));
3292
+ }
3293
+ return _results;
3294
+ };
3295
+
3296
+ Console.prototype.reportSpecResults = function(spec) {
3297
+ var result;
3298
+ this.spec = new Teabag.Spec(spec);
3299
+ result = this.spec.result();
3300
+ this.reportSuites();
3301
+ switch (result.status) {
3302
+ case "pending":
3303
+ return this.trackPending();
3304
+ case "failed":
3305
+ return this.trackFailure();
3306
+ default:
3307
+ return this.log({
3308
+ type: "spec",
3309
+ suite: this.spec.suiteName,
3310
+ label: this.spec.description,
3311
+ status: result.status,
3312
+ skipped: result.skipped
3313
+ });
3314
+ }
3315
+ };
3316
+
3317
+ Console.prototype.trackPending = function() {
3318
+ var result;
3319
+ result = this.spec.result();
3320
+ return this.log({
3321
+ type: "spec",
3322
+ suite: this.spec.suiteName,
3323
+ label: this.spec.description,
3324
+ status: result.status,
3325
+ skipped: result.skipped
3326
+ });
3327
+ };
3328
+
3329
+ Console.prototype.trackFailure = function() {
3330
+ var error, result, _i, _len, _ref, _results;
3331
+ result = this.spec.result();
3332
+ _ref = this.spec.errors();
3333
+ _results = [];
3334
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
3335
+ error = _ref[_i];
3336
+ _results.push(this.log({
3337
+ type: "spec",
3338
+ suite: this.spec.suiteName,
3339
+ label: this.spec.description,
3340
+ status: result.status,
3341
+ skipped: result.skipped,
3342
+ link: this.spec.link,
3343
+ message: error.message,
3344
+ trace: error.stack || error.message || "Stack Trace Unavailable"
3345
+ }));
3346
+ }
3347
+ return _results;
3348
+ };
3349
+
3350
+ Console.prototype.reportRunnerResults = function() {
3351
+ this.log({
3352
+ type: "result",
3353
+ elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5)
3354
+ });
3355
+ return Teabag.finished = true;
3356
+ };
3357
+
3358
+ Console.prototype.log = function(obj) {
3359
+ if (obj == null) {
3360
+ obj = {};
3361
+ }
3362
+ obj["_teabag"] = true;
3363
+ return Teabag.log(JSON.stringify(obj));
3364
+ };
3365
+
3366
+ return Console;
3367
+
3368
+ })();
3369
+
3410
3370
  }).call(this);
3411
3371
  (function() {
3412
3372
  var __hasProp = {}.hasOwnProperty,
@@ -3461,11 +3421,7 @@ jasmine.version_= {
3461
3421
  return spec.getFullName().indexOf(grep) === 0;
3462
3422
  };
3463
3423
  }
3464
- if (navigator.userAgent.match(/PhantomJS/)) {
3465
- reporter = new Teabag.Reporters.Console();
3466
- } else {
3467
- reporter = new Teabag.Reporters.HTML();
3468
- }
3424
+ reporter = new (this.getReporter())();
3469
3425
  if (typeof reporter.setFilter === "function") {
3470
3426
  reporter.setFilter(this.params["grep"]);
3471
3427
  }
@@ -3487,4 +3443,87 @@ jasmine.version_= {
3487
3443
 
3488
3444
  })(Teabag.Runner);
3489
3445
 
3446
+ Teabag.Spec = (function() {
3447
+
3448
+ function Spec(spec) {
3449
+ this.spec = spec;
3450
+ this.fullDescription = this.spec.getFullName();
3451
+ this.description = this.spec.description;
3452
+ this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
3453
+ this.parent = this.spec.suite;
3454
+ this.suiteName = this.parent.getFullName();
3455
+ this.viewId = this.spec.viewId;
3456
+ this.pending = this.spec.pending;
3457
+ }
3458
+
3459
+ Spec.prototype.errors = function() {
3460
+ var item, _i, _len, _ref, _results;
3461
+ if (!this.spec.results) {
3462
+ return [];
3463
+ }
3464
+ _ref = this.spec.results().getItems();
3465
+ _results = [];
3466
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
3467
+ item = _ref[_i];
3468
+ if (item.passed()) {
3469
+ continue;
3470
+ }
3471
+ _results.push({
3472
+ message: item.message,
3473
+ stack: item.trace.stack
3474
+ });
3475
+ }
3476
+ return _results;
3477
+ };
3478
+
3479
+ Spec.prototype.getParents = function() {
3480
+ var parent;
3481
+ if (this.parents) {
3482
+ return this.parents;
3483
+ }
3484
+ this.parents || (this.parents = []);
3485
+ parent = this.parent;
3486
+ while (parent) {
3487
+ parent = new Teabag.Suite(parent);
3488
+ this.parents.unshift(parent);
3489
+ parent = parent.parent;
3490
+ }
3491
+ return this.parents;
3492
+ };
3493
+
3494
+ Spec.prototype.result = function() {
3495
+ var results, status;
3496
+ results = this.spec.results();
3497
+ status = "failed";
3498
+ if (results.passed()) {
3499
+ status = "passed";
3500
+ }
3501
+ if (this.spec.pending) {
3502
+ status = "pending";
3503
+ }
3504
+ return {
3505
+ status: status,
3506
+ skipped: results.skipped
3507
+ };
3508
+ };
3509
+
3510
+ return Spec;
3511
+
3512
+ })();
3513
+
3514
+ Teabag.Suite = (function() {
3515
+
3516
+ function Suite(suite) {
3517
+ this.suite = suite;
3518
+ this.fullDescription = this.suite.getFullName();
3519
+ this.description = this.suite.description;
3520
+ this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
3521
+ this.parent = this.suite.parentSuite;
3522
+ this.viewId = this.suite.viewId;
3523
+ }
3524
+
3525
+ return Suite;
3526
+
3527
+ })();
3528
+
3490
3529
  }).call(this);