teabag 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +61 -6
- data/app/assets/javascripts/teabag-jasmine.js +14 -11
- data/app/assets/javascripts/teabag-mocha.js +21 -12
- data/app/assets/javascripts/teabag-qunit.js +14 -11
- data/app/assets/javascripts/teabag/base/reporters/console.coffee +2 -1
- data/app/assets/javascripts/teabag/base/reporters/html.coffee +1 -1
- data/app/assets/javascripts/teabag/base/teabag.coffee +4 -3
- data/app/assets/javascripts/teabag/mocha/reporters/console.coffee +1 -0
- data/app/assets/javascripts/teabag/mocha/reporters/html.coffee +2 -1
- data/app/controllers/teabag/spec_controller.rb +2 -0
- data/app/helpers/teabag/spec_helper.rb +9 -2
- data/app/views/teabag/spec/runner.html.erb +1 -1
- data/lib/generators/teabag/install/templates/env.rb +11 -7
- data/lib/generators/teabag/install/templates/jasmine/initializer.rb +6 -0
- data/lib/generators/teabag/install/templates/mocha/initializer.rb +6 -0
- data/lib/generators/teabag/install/templates/qunit/initializer.rb +6 -0
- data/lib/teabag.rb +3 -0
- data/lib/teabag/command_line.rb +26 -9
- data/lib/teabag/configuration.rb +32 -17
- data/lib/teabag/coverage.rb +34 -0
- data/lib/teabag/drivers/phantomjs/runner.coffee +7 -2
- data/lib/teabag/engine.rb +3 -0
- data/lib/teabag/formatters/base_formatter.rb +9 -0
- data/lib/teabag/formatters/dot_formatter.rb +9 -11
- data/lib/teabag/instrumentation.rb +65 -0
- data/lib/teabag/result.rb +19 -13
- data/lib/teabag/runner.rb +1 -1
- data/lib/teabag/suite.rb +13 -3
- data/lib/teabag/utility.rb +1 -0
- data/lib/teabag/version.rb +1 -1
- data/spec/dummy/app/assets/javascripts/instrumented1.coffee +1 -0
- data/spec/dummy/app/assets/javascripts/instrumented2.coffee +1 -0
- data/spec/dummy/config/initializers/teabag.rb +6 -0
- data/spec/dummy/log/development.log +9251 -0
- data/spec/dummy/log/test.log +2094 -0
- data/spec/dummy/tmp/cache/assets/C13/B50/sprockets%2F431452d41e5087d2211162d23c63789b +0 -0
- data/spec/dummy/tmp/cache/assets/C2B/5D0/sprockets%2F98606f6051a5fc71379af24236793353 +0 -0
- data/spec/dummy/tmp/cache/assets/C35/510/sprockets%2Fb5f1121863a3025179f1a621e7127b10 +0 -0
- data/spec/dummy/tmp/cache/assets/C35/A30/sprockets%2F29906bf540f7d2e081088494b2554989 +0 -0
- data/spec/dummy/tmp/cache/assets/C4E/9B0/sprockets%2Fa807397434c9262c3d62da3e91152184 +0 -0
- data/spec/dummy/tmp/cache/assets/C51/3F0/sprockets%2F759a198d3c007241619a48f992210a5e +0 -0
- data/spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 +0 -0
- data/spec/dummy/tmp/cache/assets/C64/740/sprockets%2Fa65d355185e6ed0699611739c38a6683 +0 -0
- data/spec/dummy/tmp/cache/assets/C72/150/sprockets%2F4194031b4b51b6422c14ac697e3455e5 +0 -0
- data/spec/dummy/tmp/cache/assets/C75/D50/sprockets%2F5302968a40e08d2c011aa38666d273f6 +0 -0
- data/spec/dummy/tmp/cache/assets/C78/6B0/sprockets%2F173640f631a07f48c900a9c2923c825b +0 -0
- data/spec/dummy/tmp/cache/assets/C78/EF0/sprockets%2F65f827a4a5337d05d037845161b41ab8 +0 -0
- data/spec/dummy/tmp/cache/assets/C78/F80/sprockets%2F9161622ddd251097a4ab816b8220984c +0 -0
- data/spec/dummy/tmp/cache/assets/C7A/EC0/sprockets%2F5c16e4214f5662e1b27932a57c43491b +0 -0
- data/spec/dummy/tmp/cache/assets/C7C/AC0/sprockets%2F29124be1160817c61bb4878894b2ba55 +0 -0
- data/spec/dummy/tmp/cache/assets/C7D/8F0/sprockets%2Ff13d01b85f2449a4f0638ff260425906 +0 -0
- data/spec/dummy/tmp/cache/assets/C80/F70/sprockets%2Fe5c9811902c221828ea647978f000be3 +0 -0
- data/spec/dummy/tmp/cache/assets/C83/E90/sprockets%2F8be0bf09618c38257464f07790a4163b +0 -0
- data/spec/dummy/tmp/cache/assets/C89/700/sprockets%2F259935a7704fef0069303ea63fa89408 +0 -0
- data/spec/dummy/tmp/cache/assets/C8A/460/sprockets%2F77bffd9959420103906722b404ae8d59 +0 -0
- data/spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 +0 -0
- data/spec/dummy/tmp/cache/assets/C92/CB0/sprockets%2F45739dff24234d860f5b75254966b49a +0 -0
- data/spec/dummy/tmp/cache/assets/C97/430/sprockets%2Fc049582fd1c9178ff983323f75326f64 +0 -0
- data/spec/dummy/tmp/cache/assets/C9D/E90/sprockets%2F3045c9533f179d3e1c805d163ed002a0 +0 -0
- data/spec/dummy/tmp/cache/assets/CA6/2F0/sprockets%2F20040c18b672e4c4d2731a2a929d8b97 +0 -0
- data/spec/dummy/tmp/cache/assets/CA6/DF0/sprockets%2F7da83747ce56e49393b6b8726587f846 +0 -0
- data/spec/dummy/tmp/cache/assets/CA9/C40/sprockets%2F932b7e2cd1e067289ab51190800814df +0 -0
- data/spec/dummy/tmp/cache/assets/CAA/0C0/sprockets%2F057b0ce384f16d9202ae84473436cc35 +0 -0
- data/spec/dummy/tmp/cache/assets/CAD/410/sprockets%2F651414e5c7e86f05c5108dc71626b25c +0 -0
- data/spec/dummy/tmp/cache/assets/CAF/0F0/sprockets%2F6000e67cf3f2377f860c24da7c819701 +0 -0
- data/spec/dummy/tmp/cache/assets/CB0/700/sprockets%2F006af6bf0f6b55777b03c4615c853881 +0 -0
- data/spec/dummy/tmp/cache/assets/CB4/6A0/sprockets%2F7373c9de844b711519cb49c4f1b16822 +0 -0
- data/spec/dummy/tmp/cache/assets/CB5/E60/sprockets%2Ff0f2b623b42840839e37f5ed055f5482 +0 -0
- data/spec/dummy/tmp/cache/assets/CB7/2B0/sprockets%2Fdf3d317564a780186148134f2ddd59a9 +0 -0
- data/spec/dummy/tmp/cache/assets/CBB/FA0/sprockets%2F74922109263bdc965b2e9567eec6d154 +0 -0
- data/spec/dummy/tmp/cache/assets/CBD/AF0/sprockets%2Fd687ec33822256e9444e8cd04f1b4873 +0 -0
- data/spec/dummy/tmp/cache/assets/CBF/630/sprockets%2F707d2db81468088470d476abff35388d +0 -0
- data/spec/dummy/tmp/cache/assets/CC2/EC0/sprockets%2F76bf80cb571ca530357f78db78167866 +0 -0
- data/spec/dummy/tmp/cache/assets/CC3/BA0/sprockets%2Fa717665e3657e376fa8d788940d6a22a +0 -0
- data/spec/dummy/tmp/cache/assets/CCC/DB0/sprockets%2F3998958d61cda73452466f5652ed81ef +0 -0
- data/spec/dummy/tmp/cache/assets/CCE/C50/sprockets%2Fe12774c2fea852112414bb379a71f31a +0 -0
- data/spec/dummy/tmp/cache/assets/CD3/460/sprockets%2F7f3f6802b0b309ed142d0b671c9640c4 +0 -0
- data/spec/dummy/tmp/cache/assets/CD6/DD0/sprockets%2F301bd3b0e19eb866905681d03a891be3 +0 -0
- data/spec/dummy/tmp/cache/assets/CD9/DD0/sprockets%2Fe5774759168a731da1c1149ecf0e1b03 +0 -0
- data/spec/dummy/tmp/cache/assets/CDC/E90/sprockets%2F019bff716c58b9c1f2221562fe29c170 +0 -0
- data/spec/dummy/tmp/cache/assets/CE0/090/sprockets%2F48d5d35ae87d0723318b8bc257fa2237 +0 -0
- data/spec/dummy/tmp/cache/assets/CE0/4C0/sprockets%2Fb8694bbec107486c72e40670b3b7832d +0 -0
- data/spec/dummy/tmp/cache/assets/CE2/190/sprockets%2F0183b0f4e9f302b8677a5e31c45c89c5 +0 -0
- data/spec/dummy/tmp/cache/assets/CE3/1F0/sprockets%2Fe69a515d3a9d14c669be8871012a7d07 +0 -0
- data/spec/dummy/tmp/cache/assets/CE4/190/sprockets%2F36c9ee4181433e33e07eb9748d218ae2 +0 -0
- data/spec/dummy/tmp/cache/assets/CE6/270/sprockets%2F2c98152560d18470fec8cf4c6829b4d0 +0 -0
- data/spec/dummy/tmp/cache/assets/CE6/7C0/sprockets%2Fa03a2c86ce6724be8542295e1cf24798 +0 -0
- data/spec/dummy/tmp/cache/assets/CE6/990/sprockets%2F02e1c54cebf6319465e469269b91ab66 +0 -0
- data/spec/dummy/tmp/cache/assets/CE7/A60/sprockets%2Ff58eee249aa167d23f8220087bb46684 +0 -0
- data/spec/dummy/tmp/cache/assets/CE9/9E0/sprockets%2F135480d497ed7e4884462dc0ef0b80d7 +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/680/sprockets%2F67f0794ef8c0576d5c7da34f4437305a +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/B40/sprockets%2F1150bf8d912aa100a132251eefaf6045 +0 -0
- data/spec/dummy/tmp/cache/assets/CEC/360/sprockets%2F264b79dde726b36d63fee272a0609469 +0 -0
- data/spec/dummy/tmp/cache/assets/CEE/930/sprockets%2Fe196521e15fd8d33e3261d5538fe8f92 +0 -0
- data/spec/dummy/tmp/cache/assets/CF1/C50/sprockets%2F57bd9ac92067ea01882feef075582758 +0 -0
- data/spec/dummy/tmp/cache/assets/CF3/3A0/sprockets%2F6571249b82eb52e7c7e035c692df9b69 +0 -0
- data/spec/dummy/tmp/cache/assets/CF4/6C0/sprockets%2F087d4a99adae6d6972937a2e57e93504 +0 -0
- data/spec/dummy/tmp/cache/assets/CF4/6F0/sprockets%2Fed96f92571224b862b84d7078b86ded3 +0 -0
- data/spec/dummy/tmp/cache/assets/CF7/F10/sprockets%2F8c45854ebd195b52cc42bf3f99996336 +0 -0
- data/spec/dummy/tmp/cache/assets/CF8/780/sprockets%2F8845b81ff27cdb57c835836c9f91a265 +0 -0
- data/spec/dummy/tmp/cache/assets/CFA/D20/sprockets%2Fb26796b39b3c5d6ed70be7989637a493 +0 -0
- data/spec/dummy/tmp/cache/assets/CFB/210/sprockets%2F9104695bfbf9a9d4b94382e6e90487a9 +0 -0
- data/spec/dummy/tmp/cache/assets/CFC/380/sprockets%2Fa7443cbd671446a589867dd5f4a4f989 +0 -0
- data/spec/dummy/tmp/cache/assets/D00/110/sprockets%2F6a6353b7723a8b21708e0fbfe04bd422 +0 -0
- data/spec/dummy/tmp/cache/assets/D00/F60/sprockets%2F42e279b52511c47d26c0adb125fd04e8 +0 -0
- data/spec/dummy/tmp/cache/assets/D02/570/sprockets%2F51fa8dc514e6256ae0836d5eb24e0312 +0 -0
- data/spec/dummy/tmp/cache/assets/D03/630/sprockets%2F5d8da32dba6a7be70426a1d554773701 +0 -0
- data/spec/dummy/tmp/cache/assets/D04/170/sprockets%2F76ab1dc02e6c7618852708a1e05a2df3 +0 -0
- data/spec/dummy/tmp/cache/assets/D04/480/sprockets%2F8bd8f10500b21d2f9d94e4cd1401c936 +0 -0
- data/spec/dummy/tmp/cache/assets/D04/580/sprockets%2F18748d128c062c8eab0e22d35d41b19e +0 -0
- data/spec/dummy/tmp/cache/assets/D05/8D0/sprockets%2F319f8f235f452343f1ebf03cb262d23d +0 -0
- data/spec/dummy/tmp/cache/assets/D09/BF0/sprockets%2F9e6bca5d26f50d9484385d51ba04312c +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/210/sprockets%2Fb95ce127097fba0e4019f633e91b730d +0 -0
- data/spec/dummy/tmp/cache/assets/D0E/570/sprockets%2F90fe371bf8091e88a712124d9cdae260 +0 -0
- data/spec/dummy/tmp/cache/assets/D12/F40/sprockets%2Fb6f95541e256c15909e0a5a5fbf2a359 +0 -0
- data/spec/dummy/tmp/cache/assets/D15/750/sprockets%2F8effdd3e668a4036260a3e370f3b6657 +0 -0
- data/spec/dummy/tmp/cache/assets/D17/710/sprockets%2Ffa49fb6823d466e79a195e0cd71340c5 +0 -0
- data/spec/dummy/tmp/cache/assets/D18/AF0/sprockets%2F8f572049bd1b0a6f1eb3d27979c9544c +0 -0
- data/spec/dummy/tmp/cache/assets/D1A/D30/sprockets%2F815a5177e9edba0c5c996182ef1b3675 +0 -0
- data/spec/dummy/tmp/cache/assets/D1B/480/sprockets%2F281f079dce6c1e4794b2ec756851d51e +0 -0
- data/spec/dummy/tmp/cache/assets/D1D/560/sprockets%2F1ca784ee7ba1922465147e7f8963eae5 +0 -0
- data/spec/dummy/tmp/cache/assets/D1E/AA0/sprockets%2F5c8741a556bc955cd36e61c88582b6dc +0 -0
- data/spec/dummy/tmp/cache/assets/D21/AD0/sprockets%2Fd471d7f687f61341d8b19efc41f39e44 +0 -0
- data/spec/dummy/tmp/cache/assets/D22/D70/sprockets%2Fe86ae12aa97067ed78aa94489484ec16 +0 -0
- data/spec/dummy/tmp/cache/assets/D23/E70/sprockets%2F0c6d23a1282deab18acb51022a74489a +0 -0
- data/spec/dummy/tmp/cache/assets/D23/F90/sprockets%2F2923479467bdf1e189d0c8f79ae46fc0 +0 -0
- data/spec/dummy/tmp/cache/assets/D2C/5B0/sprockets%2Fff04a2033b20f70f62911fa18cb9ad37 +0 -0
- data/spec/dummy/tmp/cache/assets/D2D/060/sprockets%2F545ec7a363badb5e7106e5112b53b26d +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/520/sprockets%2Fea2308e8add6880c1c4d47040ab710d7 +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/810/sprockets%2F1a2674b7dac8ff403c23a570475ace04 +0 -0
- data/spec/dummy/tmp/cache/assets/D31/9C0/sprockets%2Fbd102a4f5a4985c3519dd6ab0295a1c6 +0 -0
- data/spec/dummy/tmp/cache/assets/D34/920/sprockets%2Ff234dd736ae50902ba074c526ca8f0c8 +0 -0
- data/spec/dummy/tmp/cache/assets/D35/7C0/sprockets%2Ff536a2606eaf7d542c0985104cb62baf +0 -0
- data/spec/dummy/tmp/cache/assets/D37/810/sprockets%2F99de576ce6ad42b5c0843fc21c2025b2 +0 -0
- data/spec/dummy/tmp/cache/assets/D37/FF0/sprockets%2F96841ca4cfae32c515077f3f5fc303b2 +0 -0
- data/spec/dummy/tmp/cache/assets/D39/BE0/sprockets%2Fdb727091cf3e4b4f6126c48b6063ef0b +0 -0
- data/spec/dummy/tmp/cache/assets/D3C/840/sprockets%2Fc6202ec91d567a85bd3d46dc43ea9108 +0 -0
- data/spec/dummy/tmp/cache/assets/D3D/EC0/sprockets%2F1aa82cb99ef076aea10d472b30a58979 +0 -0
- data/spec/dummy/tmp/cache/assets/D3F/3A0/sprockets%2F1b3734b358a405ca6f92455db8e4b5ff +0 -0
- data/spec/dummy/tmp/cache/assets/D44/E90/sprockets%2F05cfc0bf7c9938963d1d1c63248db80d +0 -0
- data/spec/dummy/tmp/cache/assets/D45/C30/sprockets%2Fcc744877558178a3adb77c441cadce70 +0 -0
- data/spec/dummy/tmp/cache/assets/D47/A90/sprockets%2Fe7ca382b607c595ea6505853f7fb63da +0 -0
- data/spec/dummy/tmp/cache/assets/D49/1F0/sprockets%2F773b56f87127c6605e7d1d3faf2b6af6 +0 -0
- data/spec/dummy/tmp/cache/assets/D49/A10/sprockets%2Fc4656bd995a6f297c26d19b13aadb963 +0 -0
- data/spec/dummy/tmp/cache/assets/D4A/580/sprockets%2F19b8d8a9a57850de79b6c099fb2d010e +0 -0
- data/spec/dummy/tmp/cache/assets/D4A/A50/sprockets%2Fb95795be8b937dab770541e27ddb2e70 +0 -0
- data/spec/dummy/tmp/cache/assets/D4C/840/sprockets%2F7732c94884c24e764f109ce2deb2a9ed +0 -0
- data/spec/dummy/tmp/cache/assets/D50/D70/sprockets%2Fe2a3e6c95b11e0801a4eebae3a026026 +0 -0
- data/spec/dummy/tmp/cache/assets/D51/400/sprockets%2Ff5e433d8a31e80985b75ce598de236be +0 -0
- data/spec/dummy/tmp/cache/assets/D54/D80/sprockets%2F631327e25ec20edc723046cdec3bb1c0 +0 -0
- data/spec/dummy/tmp/cache/assets/D58/870/sprockets%2F3cef1ff075a050004b74ffa13c8c4f02 +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/140/sprockets%2F01f728f33e9bd12104d3b0b1dc7df0a9 +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/9D0/sprockets%2F9c18c0aa5bbe1b323c5022c98aa09f29 +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/E60/sprockets%2F167c229432f74a17b4c6a07bbb19aacb +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/710/sprockets%2F9427d05cee2caa721241a25a9af1d08f +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/CC0/sprockets%2Faa8bf6de211f2765b0a26f112b971f0c +0 -0
- data/spec/dummy/tmp/cache/assets/D5E/FA0/sprockets%2Fc81c371ae2d61a6aa1708262fba79e0d +0 -0
- data/spec/dummy/tmp/cache/assets/D60/060/sprockets%2Fe8a6ac51dd42491eaa2f9130c1629eb2 +0 -0
- data/spec/dummy/tmp/cache/assets/D61/1F0/sprockets%2F0c7a6176d2fc4db00bb9a74d36380fe1 +0 -0
- data/spec/dummy/tmp/cache/assets/D61/BD0/sprockets%2Ff96fcad988ca7fea975e538c27188605 +0 -0
- data/spec/dummy/tmp/cache/assets/D65/AD0/sprockets%2Fcc53fff930eaf306c15c4568cb265c00 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/030/sprockets%2Fb8b36ba6104c8dbe6297b4e61e6d33b1 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/BC0/sprockets%2F35d2c2b45981ade5a2db2a9c7f37a615 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/C20/sprockets%2F0d30bf27e5f74bbd85f313cb8d3c4623 +0 -0
- data/spec/dummy/tmp/cache/assets/D69/F90/sprockets%2F6a0795b7b38bd7e6142cd1b88211dade +0 -0
- data/spec/dummy/tmp/cache/assets/D6A/7E0/sprockets%2F3a3b155b775b7d32b25abc8cb6bf9727 +0 -0
- data/spec/dummy/tmp/cache/assets/D6A/950/sprockets%2F429b1806cb7580ebf29f9a12c33cbea6 +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/6E0/sprockets%2F266d99da1afe084cac250a6ba864c565 +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/890/sprockets%2Fe1317822fdcc5580f1e50c9b91c6e5bb +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/530/sprockets%2F8d52dee91bff01a8a2306d8a7c9152a9 +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/DA0/sprockets%2Fac936bf40b42227a2bf9d474ae9ec149 +0 -0
- data/spec/dummy/tmp/cache/assets/D71/A70/sprockets%2F4f10f5dd56c8a3ff78c460bbe3723a39 +0 -0
- data/spec/dummy/tmp/cache/assets/D72/C10/sprockets%2Ffbdb5250837c5cb856f464eb2cb3388b +0 -0
- data/spec/dummy/tmp/cache/assets/D73/5D0/sprockets%2F5c8608f3e25d077fa3df8cd32b50c37f +0 -0
- data/spec/dummy/tmp/cache/assets/D73/C00/sprockets%2F9cf4bfb486e4ab461e3f275a3d974c30 +0 -0
- data/spec/dummy/tmp/cache/assets/D77/B30/sprockets%2F946cf2f17c7eb41037f9ee08ad67ec40 +0 -0
- data/spec/dummy/tmp/cache/assets/D78/2F0/sprockets%2F3c61f8915b8f717b1de788e6ecad122c +0 -0
- data/spec/dummy/tmp/cache/assets/D78/870/sprockets%2F8f3a7d4fcd104fa8e47f552f6630a49e +0 -0
- data/spec/dummy/tmp/cache/assets/D7E/C10/sprockets%2F747c98c3cc7494a62dd882752adffb2b +0 -0
- data/spec/dummy/tmp/cache/assets/D7F/6C0/sprockets%2F77fe714bfff7e409a9d838cdf126700c +0 -0
- data/spec/dummy/tmp/cache/assets/D80/390/sprockets%2Fe44158f578d9ffade083a07f54eab729 +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/520/sprockets%2F221cd58a042baac534d27e4cfedc1188 +0 -0
- data/spec/dummy/tmp/cache/assets/D8D/370/sprockets%2Fc8ecf0a54ad40917d2607b0d5a6bbb27 +0 -0
- data/spec/dummy/tmp/cache/assets/D93/BD0/sprockets%2Ff5e1b60201e08e3ddf8d3de5211f3d5e +0 -0
- data/spec/dummy/tmp/cache/assets/D97/520/sprockets%2Fea2442ae4caddb758dfb1964c601b476 +0 -0
- data/spec/dummy/tmp/cache/assets/D9D/440/sprockets%2F869f9acc13b88cf15a31d24a0ac3f6f6 +0 -0
- data/spec/dummy/tmp/cache/assets/D9D/600/sprockets%2F17dcd25e57fe7397d30d44ffa1400aef +0 -0
- data/spec/dummy/tmp/cache/assets/D9E/550/sprockets%2F7395f2f9b6f6a07b44eadbf3c1216a7c +0 -0
- data/spec/dummy/tmp/cache/assets/DA0/330/sprockets%2Fcbbb4de706387d50f48a72ee6c9c1b80 +0 -0
- data/spec/dummy/tmp/cache/assets/DA4/320/sprockets%2F7fd0ad444f4a16b359bdbfe0977bb874 +0 -0
- data/spec/dummy/tmp/cache/assets/DA5/0A0/sprockets%2F7a4b5928cec69ab65afff309a04d6b47 +0 -0
- data/spec/dummy/tmp/cache/assets/DA6/D80/sprockets%2F8702dce2e6b9879a6add309e92ace2f0 +0 -0
- data/spec/dummy/tmp/cache/assets/DA8/C50/sprockets%2F0810627fddce930a399fc60d3be97fed +0 -0
- data/spec/dummy/tmp/cache/assets/DAA/2B0/sprockets%2Fe0c5d93fa08d139e198bfe47cd42b99a +0 -0
- data/spec/dummy/tmp/cache/assets/DAB/920/sprockets%2F799cc5f63f62ebc5faf4511e771fa5b5 +0 -0
- data/spec/dummy/tmp/cache/assets/DAC/9B0/sprockets%2F5e58701704fefbc8f88ae24c549fab6b +0 -0
- data/spec/dummy/tmp/cache/assets/DAD/1F0/sprockets%2Fdf7609630657aee0ebe5ed61e929d5dd +0 -0
- data/spec/dummy/tmp/cache/assets/DAE/6C0/sprockets%2F77c7a8676aeefa73156c55dfcf51cc46 +0 -0
- data/spec/dummy/tmp/cache/assets/DAF/5B0/sprockets%2F780e81d97e4eefcce73e0b82a5b1859d +0 -0
- data/spec/dummy/tmp/cache/assets/DAF/7C0/sprockets%2F8942514d59e7bffbfb33cde6fa9735c2 +0 -0
- data/spec/dummy/tmp/cache/assets/DB3/5D0/sprockets%2Fce1d4d75832c9bdeafd869f6f7b61725 +0 -0
- data/spec/dummy/tmp/cache/assets/DB3/D70/sprockets%2Fcc2f5e1f6eeb99c33881848cb1cde758 +0 -0
- data/spec/dummy/tmp/cache/assets/DB4/1F0/sprockets%2F69ad2749d7bfe831c0e74e7d7fc4dc57 +0 -0
- data/spec/dummy/tmp/cache/assets/DB4/820/sprockets%2Fe8cc1bf3231003d92b11cbf1ebd5a82f +0 -0
- data/spec/dummy/tmp/cache/assets/DB5/040/sprockets%2F9a9da5df88713663b9fbc945facca891 +0 -0
- data/spec/dummy/tmp/cache/assets/DB5/860/sprockets%2Facf25fab3016425a0e03c9d190fd4eac +0 -0
- data/spec/dummy/tmp/cache/assets/DB9/220/sprockets%2Fd2dc4f59e70e73984997ffca8ad7f4a0 +0 -0
- data/spec/dummy/tmp/cache/assets/DBC/A20/sprockets%2Fec46fb30cecc002128c61fb49cf30da8 +0 -0
- data/spec/dummy/tmp/cache/assets/DC3/230/sprockets%2Fdf52e72eb73be91eccc60182191aed0b +0 -0
- data/spec/dummy/tmp/cache/assets/DC3/AC0/sprockets%2Fe29911eb34fdf4b710dd0d2c2cf24bc9 +0 -0
- data/spec/dummy/tmp/cache/assets/DC4/CA0/sprockets%2Fdbcd5b5132f1ec3ff0e7e7db19190f03 +0 -0
- data/spec/dummy/tmp/cache/assets/DC7/A10/sprockets%2F84a8af0fcbf401864e1ae5bf092cba94 +0 -0
- data/spec/dummy/tmp/cache/assets/DC8/110/sprockets%2Faf09fc16a29e34c256dbbfa80a44b97b +0 -0
- data/spec/dummy/tmp/cache/assets/DCB/620/sprockets%2F27a68cf9fe11fb1b6326d11eba7e76cb +0 -0
- data/spec/dummy/tmp/cache/assets/DCD/EB0/sprockets%2F4f77f509126ecbced7ea2a5ab290c8d4 +0 -0
- data/spec/dummy/tmp/cache/assets/DCE/070/sprockets%2Fb6ddeed67c9ebb1834d6252ef0360d1f +0 -0
- data/spec/dummy/tmp/cache/assets/DD7/630/sprockets%2Ffa5eec4483c5be83deee04f5a5654a58 +0 -0
- data/spec/dummy/tmp/cache/assets/DDB/520/sprockets%2Faa365f7b98350c85b6acb09d5e9cbf9e +0 -0
- data/spec/dummy/tmp/cache/assets/DDB/EF0/sprockets%2Fe790bb18b64df8aa0a9fe94642a9edd8 +0 -0
- data/spec/dummy/tmp/cache/assets/DDD/A60/sprockets%2Fff948b6ffe44a3cc3d2d109a39f548fd +0 -0
- data/spec/dummy/tmp/cache/assets/DE3/6C0/sprockets%2F51c550cc1b3b021aa9aede66a5a36aff +0 -0
- data/spec/dummy/tmp/cache/assets/DE4/140/sprockets%2F139e4ab85d1aacb22c115fa136afdc8a +0 -0
- data/spec/dummy/tmp/cache/assets/DEB/110/sprockets%2F2dbdab0ce5babca645cdb5780004f875 +0 -0
- data/spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 +0 -0
- data/spec/dummy/tmp/cache/assets/DF7/E10/sprockets%2F25e4253aba9a9adcefb72552fb1ff0c8 +0 -0
- data/spec/dummy/tmp/cache/assets/DF9/AD0/sprockets%2Fc700afd7cee3fe9d7ff8352b213b2c4a +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/C20/sprockets%2Fd9178ad7e3b401c9fceafd64ea2b50d6 +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/C30/sprockets%2Fb50a07cb30b0bd0eec8e98e5de79d65d +0 -0
- data/spec/dummy/tmp/cache/assets/E00/2B0/sprockets%2Fffeda2454f8128abad731f07d7ea88da +0 -0
- data/spec/dummy/tmp/cache/assets/E02/6E0/sprockets%2F63d6a5cdb8cefa64ef76b5c6e0fd3720 +0 -0
- data/spec/dummy/tmp/cache/assets/E08/BB0/sprockets%2Fefac99af1af28543aef6fb607faa4973 +0 -0
- data/spec/dummy/tmp/cache/assets/E08/F20/sprockets%2F4fc5cdcd6974efe7adfe809b30bd6513 +0 -0
- data/spec/dummy/tmp/cache/assets/E0D/070/sprockets%2F0e7ef9a5978dcc6b1abce678ef836c0a +0 -0
- data/spec/dummy/tmp/cache/assets/E16/D30/sprockets%2Fd69469e6e7439baacd8df989c0fdacc2 +0 -0
- data/spec/dummy/tmp/cache/assets/E17/EF0/sprockets%2Fa291ad64a26afd055dfadabbdf03f154 +0 -0
- data/spec/dummy/tmp/cache/assets/E2F/790/sprockets%2F7fac280deaa7ef20a77d5c9b5b9cfc34 +0 -0
- data/spec/dummy/tmp/cache/assets/E36/A40/sprockets%2Ff3477eebd69a4f1b8fbdd3f9ef2ba242 +0 -0
- data/spec/dummy/tmp/cache/assets/E41/250/sprockets%2F97cf8fe3d7ffaff076f655aefb36da03 +0 -0
- data/spec/dummy/tmp/cache/assets/E64/1E0/sprockets%2F81ab4c863fbbdec8dd66afc97ebf034d +0 -0
- data/spec/dummy/tmp/cache/assets/E6E/260/sprockets%2Fd9f8ab8b91ef582cc6c99a3ba0dedfe6 +0 -0
- data/spec/dummy/tmp/cache/assets/E89/4C0/sprockets%2F68b2eedb3cde6fc01d50fead7caf8a18 +0 -0
- data/spec/dummy/tmp/cache/assets/F79/360/sprockets%2F0ce035fefee5ebdabc8efabfbdbd6ee4 +0 -0
- data/spec/features/console_reporter_spec.rb +7 -0
- data/spec/features/html_reporter_spec.rb +2 -6
- data/spec/features/instrumentation_spec.rb +19 -0
- data/spec/javascripts/teabag/base/reporters/console_spec.coffee +2 -0
- data/spec/javascripts/teabag/base/teabag_spec.coffee +0 -1
- data/spec/javascripts/teabag/mocha/reporters/html_mspec.coffee +1 -1
- data/spec/spec_helper.rb +0 -2
- data/spec/teabag/configuration_spec.rb +13 -15
- data/spec/teabag/coverage_spec.rb +35 -0
- data/spec/teabag/environment_spec.rb +1 -10
- data/spec/teabag/formatters/base_formatter_spec.rb +44 -0
- data/spec/teabag/formatters/dot_formatter_spec.rb +5 -9
- data/spec/teabag/instrumentation_spec.rb +101 -0
- data/spec/teabag/result_spec.rb +30 -28
- data/spec/teabag/runner_spec.rb +2 -11
- data/spec/teabag/server_spec.rb +3 -4
- data/spec/teabag/suite_spec.rb +29 -20
- data/spec/teabag_env.rb +17 -11
- data/vendor/assets/javascripts/support/sinon-chai.MIT-ISH.LICENSE +13 -0
- data/vendor/assets/javascripts/support/sinon-chai.js +109 -0
- metadata +44 -10
- data/spec/dummy/tmp/cache/assets/CC1/DB0/sprockets%2F95e6273223502af230a0dbaa25410de8 +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/740/sprockets%2F781d3a2f0449451e9f35c5b0e3e2df41 +0 -0
- data/spec/dummy/tmp/cache/assets/D44/0F0/sprockets%2Fc4d293b967c2e290deed3f3bd2271828 +0 -0
data/README.md
CHANGED
@@ -31,11 +31,12 @@ If you'd like to use Teabag with [Guard](https://github.com/guard/guard), check
|
|
31
31
|
2. [Usage](#usage)
|
32
32
|
3. [Writing Specs](#writing-specs)
|
33
33
|
4. [Fixtures](#fixtures)
|
34
|
-
5. [
|
35
|
-
6. [
|
36
|
-
7. [
|
37
|
-
8. [
|
38
|
-
9. [
|
34
|
+
5. [Coverage](#coverage)
|
35
|
+
6. [Suites](#suites)
|
36
|
+
7. [Configuration](#configuration)
|
37
|
+
8. [Test Frameworks](#test-frameworks)
|
38
|
+
9. [Support Libraries](#support-libraries)
|
39
|
+
10. [CI Support](#ci-support)
|
39
40
|
|
40
41
|
|
41
42
|
## Installation
|
@@ -219,6 +220,31 @@ describe "Using fixtures", ->
|
|
219
220
|
Check out an example of using fixtures with [Mocha](https://github.com/modeset/teabag/wiki/Using-Mocha) and [QUnit](https://github.com/modeset/teabag/wiki/Using-QUnit).
|
220
221
|
|
221
222
|
|
223
|
+
## Coverage
|
224
|
+
|
225
|
+
Teabag can use [Istanbul](https://github.com/gotwarlost/istanbul) to generate code coverage statistics and reports. Install Istanbul and adjust the configuration to always generate coverage reports, or specify by passing `--coverage` to the command line interface. Check the [configuration](#configuration) for more information.
|
226
|
+
|
227
|
+
Each suite allows you to specify which files should be ignored when generating coverage reports, which allows you to ignore support libraries and dependencies that you're not testing.
|
228
|
+
|
229
|
+
The following example will generate a simple text report and an HTML report with annotated source that you can inspect further.
|
230
|
+
|
231
|
+
```shell
|
232
|
+
bundle exec teabag --coverage-reports=text,html
|
233
|
+
```
|
234
|
+
|
235
|
+
An example text report that's output to the console after the tests have completed.
|
236
|
+
```
|
237
|
+
--------------------+-----------+-----------+-----------+-----------+
|
238
|
+
File | % Stmts |% Branches | % Funcs | % Lines |
|
239
|
+
--------------------+-----------+-----------+-----------+-----------+
|
240
|
+
phantomjs/ | 93.75 | 75 | 94.12 | 93.65 |
|
241
|
+
runner.coffee | 93.75 | 75 | 94.12 | 93.65 |
|
242
|
+
--------------------+-----------+-----------+-----------+-----------+
|
243
|
+
All files | 93.75 | 75 | 94.12 | 93.65 |
|
244
|
+
--------------------+-----------+-----------+-----------+-----------+
|
245
|
+
```
|
246
|
+
|
247
|
+
|
222
248
|
## Suites
|
223
249
|
|
224
250
|
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. You can define suites in the configuration, and for brevity `config` is the argument passed to the `Teabag.setup` block.
|
@@ -287,6 +313,12 @@ end
|
|
287
313
|
<b>default:</b> <code>["teabag"]</code>
|
288
314
|
</dd>
|
289
315
|
|
316
|
+
<dt> no_coverage </dt><dd>
|
317
|
+
If you're running coverage reports you may want to exclude libraries like jQuery, or support libraries that you're not testing. Accepts an array of filenames or regular expressions. For example, to remove jQuery use "jquery.min.js" etc.<br/><br/>
|
318
|
+
|
319
|
+
<b>default:</b> <code>`[%r{/support/}, %r{/(.+)_helper.}]`</code>
|
320
|
+
</dd>
|
321
|
+
|
290
322
|
</dl>
|
291
323
|
|
292
324
|
|
@@ -409,11 +441,34 @@ These configuration directives are applicable only when running via the rake tas
|
|
409
441
|
<b>default:</b> <code>true</code>
|
410
442
|
|
411
443
|
<ul>
|
412
|
-
<li>CLI: --[no-]color</li>
|
444
|
+
<li>CLI: -c, --[no-]color</li>
|
413
445
|
<li>ENV: COLOR=false</li>
|
414
446
|
</ul>
|
415
447
|
</dd>
|
416
448
|
|
449
|
+
<dt> coverage </dt><dd>
|
450
|
+
Add instrumentation to your code and display coverage information. Requires <a href="https://github.com/gotwarlost/istanbul">istanbul</a>.<br/><br/>
|
451
|
+
|
452
|
+
<b>default:</b> <code>false</code>
|
453
|
+
|
454
|
+
<ul>
|
455
|
+
<li>CLI: -C, --coverage</li>
|
456
|
+
<li>ENV: COVERAGE=true</li>
|
457
|
+
</ul>
|
458
|
+
</dd>
|
459
|
+
|
460
|
+
<dt> coverage </dt><dd>
|
461
|
+
Specify which code coverage reports instanbul should generate.<br/><br/>
|
462
|
+
|
463
|
+
<b>available:</b> text-summary, text, html, lcov, lcovonly, cobertura<br/>
|
464
|
+
<b>default:</b> <code>nil</code>
|
465
|
+
|
466
|
+
<ul>
|
467
|
+
<li>CLI: -R, --coverage-reports REPORTS</li>
|
468
|
+
<li>ENV: COVERAGE_REPORTS=text,html</li>
|
469
|
+
</ul>
|
470
|
+
</dd>
|
471
|
+
|
417
472
|
</dl>
|
418
473
|
|
419
474
|
|
@@ -2622,8 +2622,6 @@ jasmine.version_= {
|
|
2622
2622
|
|
2623
2623
|
Teabag.location = window.location;
|
2624
2624
|
|
2625
|
-
Teabag.console = window.console;
|
2626
|
-
|
2627
2625
|
Teabag.messages = [];
|
2628
2626
|
|
2629
2627
|
Teabag.execute = function() {
|
@@ -2641,7 +2639,7 @@ jasmine.version_= {
|
|
2641
2639
|
all = [];
|
2642
2640
|
}
|
2643
2641
|
deps = [];
|
2644
|
-
if ((paths =
|
2642
|
+
if ((paths = this.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) {
|
2645
2643
|
return all;
|
2646
2644
|
}
|
2647
2645
|
for (_i = 0, _len = paths.length; _i < _len; _i++) {
|
@@ -2662,9 +2660,12 @@ jasmine.version_= {
|
|
2662
2660
|
};
|
2663
2661
|
|
2664
2662
|
Teabag.log = function() {
|
2665
|
-
var _ref;
|
2666
2663
|
this.messages.push(arguments[0]);
|
2667
|
-
|
2664
|
+
try {
|
2665
|
+
return console.log.apply(console, arguments);
|
2666
|
+
} catch (e) {
|
2667
|
+
throw new Error("Unable to use console.log for logging");
|
2668
|
+
}
|
2668
2669
|
};
|
2669
2670
|
|
2670
2671
|
Teabag.getMessages = function() {
|
@@ -3035,8 +3036,9 @@ jasmine.version_= {
|
|
3035
3036
|
HTML.prototype.buildLayout = function() {
|
3036
3037
|
var el;
|
3037
3038
|
el = this.createEl("div");
|
3038
|
-
|
3039
|
-
|
3039
|
+
el.id = "teabag-interface";
|
3040
|
+
el.innerHTML = Teabag.Reporters.HTML.template;
|
3041
|
+
return document.body.appendChild(el);
|
3040
3042
|
};
|
3041
3043
|
|
3042
3044
|
HTML.prototype.buildSuiteSelect = function() {
|
@@ -3066,7 +3068,7 @@ jasmine.version_= {
|
|
3066
3068
|
};
|
3067
3069
|
|
3068
3070
|
HTML.prototype.reportRunnerStarting = function(runner) {
|
3069
|
-
this.total.exist = runner.total || runner.specs().length;
|
3071
|
+
this.total.exist = runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0;
|
3070
3072
|
if (this.total.exist) {
|
3071
3073
|
return this.setText("stats-duration", "...");
|
3072
3074
|
}
|
@@ -3501,7 +3503,7 @@ jasmine.version_= {
|
|
3501
3503
|
}).call(this);
|
3502
3504
|
(function() {
|
3503
3505
|
|
3504
|
-
Teabag.Reporters.HTML.template = "<div
|
3506
|
+
Teabag.Reporters.HTML.template = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1>Teabag</h1>\n <ul>\n <li>version: <b id=\"teabag-version\"></b></li>\n <li id=\"teabag-env-info\"></li>\n </ul>\n </div>\n <div id=\"teabag-progress\"></div>\n <ul id=\"teabag-stats\">\n <li>passes: <b id=\"teabag-stats-passes\">0</b></li>\n <li>failures: <b id=\"teabag-stats-failures\">0</b></li>\n <li>skipped: <b id=\"teabag-stats-skipped\">0</b></li>\n <li>duration: <b id=\"teabag-stats-duration\">∞</b></li>\n </ul>\n</div>\n\n<div id=\"teabag-controls\" class=\"teabag-clearfix\">\n <div id=\"teabag-toggles\">\n <button id=\"teabag-use-catch\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n</div>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>";
|
3505
3507
|
|
3506
3508
|
}).call(this);
|
3507
3509
|
(function() {
|
@@ -3518,7 +3520,7 @@ jasmine.version_= {
|
|
3518
3520
|
Console.prototype.reportRunnerStarting = function(runner) {
|
3519
3521
|
return this.log({
|
3520
3522
|
type: "runner",
|
3521
|
-
total: runner.total || runner.specs().length,
|
3523
|
+
total: runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0,
|
3522
3524
|
start: JSON.parse(JSON.stringify(this.start))
|
3523
3525
|
});
|
3524
3526
|
};
|
@@ -3602,7 +3604,8 @@ jasmine.version_= {
|
|
3602
3604
|
Console.prototype.reportRunnerResults = function() {
|
3603
3605
|
this.log({
|
3604
3606
|
type: "result",
|
3605
|
-
elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5)
|
3607
|
+
elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5),
|
3608
|
+
coverage: window.__coverage__
|
3606
3609
|
});
|
3607
3610
|
return Teabag.finished = true;
|
3608
3611
|
};
|
@@ -5360,8 +5360,6 @@
|
|
5360
5360
|
|
5361
5361
|
Teabag.location = window.location;
|
5362
5362
|
|
5363
|
-
Teabag.console = window.console;
|
5364
|
-
|
5365
5363
|
Teabag.messages = [];
|
5366
5364
|
|
5367
5365
|
Teabag.execute = function() {
|
@@ -5379,7 +5377,7 @@
|
|
5379
5377
|
all = [];
|
5380
5378
|
}
|
5381
5379
|
deps = [];
|
5382
|
-
if ((paths =
|
5380
|
+
if ((paths = this.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) {
|
5383
5381
|
return all;
|
5384
5382
|
}
|
5385
5383
|
for (_i = 0, _len = paths.length; _i < _len; _i++) {
|
@@ -5400,9 +5398,12 @@
|
|
5400
5398
|
};
|
5401
5399
|
|
5402
5400
|
Teabag.log = function() {
|
5403
|
-
var _ref;
|
5404
5401
|
this.messages.push(arguments[0]);
|
5405
|
-
|
5402
|
+
try {
|
5403
|
+
return console.log.apply(console, arguments);
|
5404
|
+
} catch (e) {
|
5405
|
+
throw new Error("Unable to use console.log for logging");
|
5406
|
+
}
|
5406
5407
|
};
|
5407
5408
|
|
5408
5409
|
Teabag.getMessages = function() {
|
@@ -5773,8 +5774,9 @@
|
|
5773
5774
|
HTML.prototype.buildLayout = function() {
|
5774
5775
|
var el;
|
5775
5776
|
el = this.createEl("div");
|
5776
|
-
|
5777
|
-
|
5777
|
+
el.id = "teabag-interface";
|
5778
|
+
el.innerHTML = Teabag.Reporters.HTML.template;
|
5779
|
+
return document.body.appendChild(el);
|
5778
5780
|
};
|
5779
5781
|
|
5780
5782
|
HTML.prototype.buildSuiteSelect = function() {
|
@@ -5804,7 +5806,7 @@
|
|
5804
5806
|
};
|
5805
5807
|
|
5806
5808
|
HTML.prototype.reportRunnerStarting = function(runner) {
|
5807
|
-
this.total.exist = runner.total || runner.specs().length;
|
5809
|
+
this.total.exist = runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0;
|
5808
5810
|
if (this.total.exist) {
|
5809
5811
|
return this.setText("stats-duration", "...");
|
5810
5812
|
}
|
@@ -6239,7 +6241,7 @@
|
|
6239
6241
|
}).call(this);
|
6240
6242
|
(function() {
|
6241
6243
|
|
6242
|
-
Teabag.Reporters.HTML.template = "<div
|
6244
|
+
Teabag.Reporters.HTML.template = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1>Teabag</h1>\n <ul>\n <li>version: <b id=\"teabag-version\"></b></li>\n <li id=\"teabag-env-info\"></li>\n </ul>\n </div>\n <div id=\"teabag-progress\"></div>\n <ul id=\"teabag-stats\">\n <li>passes: <b id=\"teabag-stats-passes\">0</b></li>\n <li>failures: <b id=\"teabag-stats-failures\">0</b></li>\n <li>skipped: <b id=\"teabag-stats-skipped\">0</b></li>\n <li>duration: <b id=\"teabag-stats-duration\">∞</b></li>\n </ul>\n</div>\n\n<div id=\"teabag-controls\" class=\"teabag-clearfix\">\n <div id=\"teabag-toggles\">\n <button id=\"teabag-use-catch\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n</div>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>";
|
6243
6245
|
|
6244
6246
|
}).call(this);
|
6245
6247
|
(function() {
|
@@ -6256,7 +6258,7 @@
|
|
6256
6258
|
Console.prototype.reportRunnerStarting = function(runner) {
|
6257
6259
|
return this.log({
|
6258
6260
|
type: "runner",
|
6259
|
-
total: runner.total || runner.specs().length,
|
6261
|
+
total: runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0,
|
6260
6262
|
start: JSON.parse(JSON.stringify(this.start))
|
6261
6263
|
});
|
6262
6264
|
};
|
@@ -6340,7 +6342,8 @@
|
|
6340
6342
|
Console.prototype.reportRunnerResults = function() {
|
6341
6343
|
this.log({
|
6342
6344
|
type: "result",
|
6343
|
-
elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5)
|
6345
|
+
elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5),
|
6346
|
+
coverage: window.__coverage__
|
6344
6347
|
});
|
6345
6348
|
return Teabag.finished = true;
|
6346
6349
|
};
|
@@ -6379,6 +6382,9 @@
|
|
6379
6382
|
Console.prototype.reportSpecResults = function(spec, err) {
|
6380
6383
|
if (err) {
|
6381
6384
|
spec.err = err;
|
6385
|
+
if (spec.type === "hook") {
|
6386
|
+
this.reportSpecResults(spec);
|
6387
|
+
}
|
6382
6388
|
return;
|
6383
6389
|
}
|
6384
6390
|
return Console.__super__.reportSpecResults.apply(this, arguments);
|
@@ -6410,6 +6416,9 @@
|
|
6410
6416
|
HTML.prototype.reportSpecResults = function(spec, err) {
|
6411
6417
|
if (err) {
|
6412
6418
|
spec.err = err;
|
6419
|
+
if (spec.type === "hook") {
|
6420
|
+
this.reportSpecResults(spec);
|
6421
|
+
}
|
6413
6422
|
return;
|
6414
6423
|
}
|
6415
6424
|
this.reportSpecStarting(spec);
|
@@ -6417,7 +6426,7 @@
|
|
6417
6426
|
};
|
6418
6427
|
|
6419
6428
|
HTML.prototype.envInfo = function() {
|
6420
|
-
return "mocha 1.
|
6429
|
+
return "mocha 1.8.1";
|
6421
6430
|
};
|
6422
6431
|
|
6423
6432
|
return HTML;
|
@@ -1998,8 +1998,6 @@
|
|
1998
1998
|
|
1999
1999
|
Teabag.location = window.location;
|
2000
2000
|
|
2001
|
-
Teabag.console = window.console;
|
2002
|
-
|
2003
2001
|
Teabag.messages = [];
|
2004
2002
|
|
2005
2003
|
Teabag.execute = function() {
|
@@ -2017,7 +2015,7 @@
|
|
2017
2015
|
all = [];
|
2018
2016
|
}
|
2019
2017
|
deps = [];
|
2020
|
-
if ((paths =
|
2018
|
+
if ((paths = this.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) {
|
2021
2019
|
return all;
|
2022
2020
|
}
|
2023
2021
|
for (_i = 0, _len = paths.length; _i < _len; _i++) {
|
@@ -2038,9 +2036,12 @@
|
|
2038
2036
|
};
|
2039
2037
|
|
2040
2038
|
Teabag.log = function() {
|
2041
|
-
var _ref;
|
2042
2039
|
this.messages.push(arguments[0]);
|
2043
|
-
|
2040
|
+
try {
|
2041
|
+
return console.log.apply(console, arguments);
|
2042
|
+
} catch (e) {
|
2043
|
+
throw new Error("Unable to use console.log for logging");
|
2044
|
+
}
|
2044
2045
|
};
|
2045
2046
|
|
2046
2047
|
Teabag.getMessages = function() {
|
@@ -2411,8 +2412,9 @@
|
|
2411
2412
|
HTML.prototype.buildLayout = function() {
|
2412
2413
|
var el;
|
2413
2414
|
el = this.createEl("div");
|
2414
|
-
|
2415
|
-
|
2415
|
+
el.id = "teabag-interface";
|
2416
|
+
el.innerHTML = Teabag.Reporters.HTML.template;
|
2417
|
+
return document.body.appendChild(el);
|
2416
2418
|
};
|
2417
2419
|
|
2418
2420
|
HTML.prototype.buildSuiteSelect = function() {
|
@@ -2442,7 +2444,7 @@
|
|
2442
2444
|
};
|
2443
2445
|
|
2444
2446
|
HTML.prototype.reportRunnerStarting = function(runner) {
|
2445
|
-
this.total.exist = runner.total || runner.specs().length;
|
2447
|
+
this.total.exist = runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0;
|
2446
2448
|
if (this.total.exist) {
|
2447
2449
|
return this.setText("stats-duration", "...");
|
2448
2450
|
}
|
@@ -2877,7 +2879,7 @@
|
|
2877
2879
|
}).call(this);
|
2878
2880
|
(function() {
|
2879
2881
|
|
2880
|
-
Teabag.Reporters.HTML.template = "<div
|
2882
|
+
Teabag.Reporters.HTML.template = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1>Teabag</h1>\n <ul>\n <li>version: <b id=\"teabag-version\"></b></li>\n <li id=\"teabag-env-info\"></li>\n </ul>\n </div>\n <div id=\"teabag-progress\"></div>\n <ul id=\"teabag-stats\">\n <li>passes: <b id=\"teabag-stats-passes\">0</b></li>\n <li>failures: <b id=\"teabag-stats-failures\">0</b></li>\n <li>skipped: <b id=\"teabag-stats-skipped\">0</b></li>\n <li>duration: <b id=\"teabag-stats-duration\">∞</b></li>\n </ul>\n</div>\n\n<div id=\"teabag-controls\" class=\"teabag-clearfix\">\n <div id=\"teabag-toggles\">\n <button id=\"teabag-use-catch\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n</div>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>";
|
2881
2883
|
|
2882
2884
|
}).call(this);
|
2883
2885
|
(function() {
|
@@ -2894,7 +2896,7 @@
|
|
2894
2896
|
Console.prototype.reportRunnerStarting = function(runner) {
|
2895
2897
|
return this.log({
|
2896
2898
|
type: "runner",
|
2897
|
-
total: runner.total || runner.specs().length,
|
2899
|
+
total: runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0,
|
2898
2900
|
start: JSON.parse(JSON.stringify(this.start))
|
2899
2901
|
});
|
2900
2902
|
};
|
@@ -2978,7 +2980,8 @@
|
|
2978
2980
|
Console.prototype.reportRunnerResults = function() {
|
2979
2981
|
this.log({
|
2980
2982
|
type: "result",
|
2981
|
-
elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5)
|
2983
|
+
elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5),
|
2984
|
+
coverage: window.__coverage__
|
2982
2985
|
});
|
2983
2986
|
return Teabag.finished = true;
|
2984
2987
|
};
|
@@ -8,7 +8,7 @@ class Teabag.Reporters.Console
|
|
8
8
|
reportRunnerStarting: (runner) ->
|
9
9
|
@log
|
10
10
|
type: "runner"
|
11
|
-
total: runner.total || runner.specs().length
|
11
|
+
total: runner.total || runner.specs?().length || 0
|
12
12
|
start: JSON.parse(JSON.stringify(@start))
|
13
13
|
|
14
14
|
|
@@ -67,6 +67,7 @@ class Teabag.Reporters.Console
|
|
67
67
|
@log
|
68
68
|
type: "result"
|
69
69
|
elapsed: ((new Teabag.Date().getTime() - @start.getTime()) / 1000).toFixed(5)
|
70
|
+
coverage: window.__coverage__
|
70
71
|
Teabag.finished = true
|
71
72
|
|
72
73
|
|
@@ -62,7 +62,7 @@ class Teabag.Reporters.HTML extends Teabag.Reporters.BaseView
|
|
62
62
|
|
63
63
|
|
64
64
|
reportRunnerStarting: (runner) ->
|
65
|
-
@total.exist = runner.total || runner.specs().length
|
65
|
+
@total.exist = runner.total || runner.specs?().length || 0
|
66
66
|
@setText("stats-duration", "...") if @total.exist
|
67
67
|
|
68
68
|
|
@@ -13,7 +13,6 @@ class @Teabag
|
|
13
13
|
@Reporters: {}
|
14
14
|
@Date: Date
|
15
15
|
@location: window.location
|
16
|
-
@console: window.console
|
17
16
|
@messages: []
|
18
17
|
|
19
18
|
@execute: ->
|
@@ -27,7 +26,7 @@ class @Teabag
|
|
27
26
|
# provides interface for AMD usage -- pass all dependencies in as an array, and params will be checked for matches
|
28
27
|
@resolveDependenciesFromParams: (all = []) ->
|
29
28
|
deps = []
|
30
|
-
return all if (paths =
|
29
|
+
return all if (paths = @location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) == null
|
31
30
|
|
32
31
|
for path in paths
|
33
32
|
parts = decodeURIComponent(path.replace(/\+/g, " ")).match(/\/(.+)\.(js|js.coffee|coffee)$/i)
|
@@ -40,7 +39,9 @@ class @Teabag
|
|
40
39
|
# logging methods -- used by selenium / phantomJS to get information back to ruby
|
41
40
|
@log: ->
|
42
41
|
@messages.push(arguments[0])
|
43
|
-
|
42
|
+
try console.log(arguments...)
|
43
|
+
catch e
|
44
|
+
throw new Error("Unable to use console.log for logging")
|
44
45
|
|
45
46
|
|
46
47
|
@getMessages: ->
|
@@ -11,13 +11,14 @@ class Teabag.Reporters.HTML extends Teabag.Reporters.HTML
|
|
11
11
|
reportSpecResults: (spec, err) =>
|
12
12
|
if err
|
13
13
|
spec.err = err
|
14
|
+
@reportSpecResults(spec) if spec.type == "hook"
|
14
15
|
return
|
15
16
|
@reportSpecStarting(spec)
|
16
17
|
super
|
17
18
|
|
18
19
|
|
19
20
|
envInfo: ->
|
20
|
-
"mocha 1.
|
21
|
+
"mocha 1.8.1"
|
21
22
|
|
22
23
|
|
23
24
|
class Teabag.Reporters.HTML.SpecView extends Teabag.Reporters.HTML.SpecView
|