teabag 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +99 -92
- data/app/assets/javascripts/teabag/base/fixture.coffee +99 -0
- data/app/assets/javascripts/teabag/base/teabag.coffee +1 -0
- data/app/assets/javascripts/teabag/jasmine.coffee +34 -2
- data/app/assets/javascripts/teabag/mocha.coffee +24 -2
- data/app/assets/javascripts/teabag/qunit.coffee +14 -5
- data/app/assets/javascripts/teabag-jasmine.js +244 -4
- data/app/assets/javascripts/teabag-mocha.js +228 -4
- data/app/assets/javascripts/teabag-qunit.js +200 -9
- data/app/assets/stylesheets/teabag.css +1 -0
- data/app/views/teabag/spec/index.html.erb +8 -9
- data/lib/generators/teabag/install/templates/initializer.rb +26 -28
- data/lib/teabag/suite.rb +9 -1
- data/lib/teabag/version.rb +1 -1
- data/spec/dummy/log/development.log +69910 -0
- data/spec/dummy/log/test.log +85 -0
- data/spec/dummy/tmp/cache/assets/C13/B50/sprockets%2F431452d41e5087d2211162d23c63789b +0 -0
- data/spec/dummy/tmp/cache/assets/C1C/2A0/sprockets%2F5820652740cdd23312489d2168c02e69 +0 -0
- data/spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 +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/C8A/460/sprockets%2F77bffd9959420103906722b404ae8d59 +0 -0
- data/spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 +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/CAD/410/sprockets%2F651414e5c7e86f05c5108dc71626b25c +0 -0
- data/spec/dummy/tmp/cache/assets/CAF/0F0/sprockets%2F6000e67cf3f2377f860c24da7c819701 +0 -0
- data/spec/dummy/tmp/cache/assets/CB4/6A0/sprockets%2F7373c9de844b711519cb49c4f1b16822 +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/CC8/830/sprockets%2F0b287580513a016ea8cc914bbfe03016 +0 -0
- data/spec/dummy/tmp/cache/assets/CCE/C50/sprockets%2Fe12774c2fea852112414bb379a71f31a +0 -0
- data/spec/dummy/tmp/cache/assets/CD1/620/sprockets%2F06a3eb05fcb4175a679d6084a06026a6 +0 -0
- data/spec/dummy/tmp/cache/assets/CD3/460/sprockets%2F7f3f6802b0b309ed142d0b671c9640c4 +0 -0
- data/spec/dummy/tmp/cache/assets/CE0/090/sprockets%2F48d5d35ae87d0723318b8bc257fa2237 +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/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/090/sprockets%2F55dcd7ace406b77208c380d496e37864 +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/B40/sprockets%2F1150bf8d912aa100a132251eefaf6045 +0 -0
- data/spec/dummy/tmp/cache/assets/CF7/F10/sprockets%2F8c45854ebd195b52cc42bf3f99996336 +0 -0
- data/spec/dummy/tmp/cache/assets/CFA/D20/sprockets%2Fb26796b39b3c5d6ed70be7989637a493 +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/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/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/740/sprockets%2F781d3a2f0449451e9f35c5b0e3e2df41 +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/D1B/730/sprockets%2Fcf6ce779d043d29aae915f599a413380 +0 -0
- data/spec/dummy/tmp/cache/assets/D1E/AA0/sprockets%2F5c8741a556bc955cd36e61c88582b6dc +0 -0
- data/spec/dummy/tmp/cache/assets/D21/240/sprockets%2Ffdd497fc5d8257a9e4a0aa2473798184 +0 -0
- data/spec/dummy/tmp/cache/assets/D31/9C0/sprockets%2Fbd102a4f5a4985c3519dd6ab0295a1c6 +0 -0
- data/spec/dummy/tmp/cache/assets/D32/500/sprockets%2F6927df5a24d91c75d001e2b5600ab8be +0 -0
- data/spec/dummy/tmp/cache/assets/D35/7C0/sprockets%2Ff536a2606eaf7d542c0985104cb62baf +0 -0
- data/spec/dummy/tmp/cache/assets/D3C/840/sprockets%2Fc6202ec91d567a85bd3d46dc43ea9108 +0 -0
- data/spec/dummy/tmp/cache/assets/D44/E90/sprockets%2F05cfc0bf7c9938963d1d1c63248db80d +0 -0
- data/spec/dummy/tmp/cache/assets/D47/A90/sprockets%2Fe7ca382b607c595ea6505853f7fb63da +0 -0
- data/spec/dummy/tmp/cache/assets/D49/A10/sprockets%2Fc4656bd995a6f297c26d19b13aadb963 +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/D60/060/sprockets%2Fe8a6ac51dd42491eaa2f9130c1629eb2 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/BC0/sprockets%2F35d2c2b45981ade5a2db2a9c7f37a615 +0 -0
- data/spec/dummy/tmp/cache/assets/D69/F90/sprockets%2F6a0795b7b38bd7e6142cd1b88211dade +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/6E0/sprockets%2F266d99da1afe084cac250a6ba864c565 +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/DA0/sprockets%2Fac936bf40b42227a2bf9d474ae9ec149 +0 -0
- data/spec/dummy/tmp/cache/assets/D6F/5B0/sprockets%2F5dcc801a7a6c340c5baf525839f9b8b6 +0 -0
- data/spec/dummy/tmp/cache/assets/D73/C00/sprockets%2F9cf4bfb486e4ab461e3f275a3d974c30 +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/D78/F10/sprockets%2Fa2d995664d1a9bf976c1bfbbb90f8710 +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/520/sprockets%2F221cd58a042baac534d27e4cfedc1188 +0 -0
- data/spec/dummy/tmp/cache/assets/D93/BD0/sprockets%2Ff5e1b60201e08e3ddf8d3de5211f3d5e +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/DA9/BF0/sprockets%2Fc59f8f7bf494fe030610bc86bb7cc5e5 +0 -0
- data/spec/dummy/tmp/cache/assets/DAE/6C0/sprockets%2F77c7a8676aeefa73156c55dfcf51cc46 +0 -0
- data/spec/dummy/tmp/cache/assets/DB3/5D0/sprockets%2Fce1d4d75832c9bdeafd869f6f7b61725 +0 -0
- data/spec/dummy/tmp/cache/assets/DB5/040/sprockets%2F9a9da5df88713663b9fbc945facca891 +0 -0
- data/spec/dummy/tmp/cache/assets/DC4/860/sprockets%2Fa01a3cf460ff15daae0f928d0f85f52e +0 -0
- data/spec/dummy/tmp/cache/assets/DC7/A10/sprockets%2F84a8af0fcbf401864e1ae5bf092cba94 +0 -0
- data/spec/dummy/tmp/cache/assets/DE3/6C0/sprockets%2F51c550cc1b3b021aa9aede66a5a36aff +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/DFC/C20/sprockets%2Fd9178ad7e3b401c9fceafd64ea2b50d6 +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/C30/sprockets%2Fb50a07cb30b0bd0eec8e98e5de79d65d +0 -0
- data/spec/dummy/tmp/cache/assets/E02/6E0/sprockets%2F63d6a5cdb8cefa64ef76b5c6e0fd3720 +0 -0
- data/spec/dummy/tmp/cache/assets/E08/F20/sprockets%2F4fc5cdcd6974efe7adfe809b30bd6513 +0 -0
- data/spec/dummy/tmp/cache/assets/E14/8E0/sprockets%2Fb8d902ffcf8758fde63d0fa579ba6d4e +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/E41/250/sprockets%2F97cf8fe3d7ffaff076f655aefb36da03 +0 -0
- data/spec/dummy/tmp/cache/assets/E6E/260/sprockets%2Fd9f8ab8b91ef582cc6c99a3ba0dedfe6 +0 -0
- data/spec/dummy/tmp/cache/assets/F79/360/sprockets%2F0ce035fefee5ebdabc8efabfbdbd6ee4 +0 -0
- data/spec/javascripts/fixtures/fixture.json +4 -0
- data/spec/javascripts/teabag/base/fixture_spec.coffee +93 -0
- data/spec/javascripts/teabag/jasmine/jasmine_jspec.coffee +16 -0
- data/spec/javascripts/teabag/mocha/mocha_mspec.coffee +16 -3
- data/spec/teabag/suite_spec.rb +23 -1
- metadata +15 -4
data/spec/dummy/log/test.log
CHANGED
@@ -4259,3 +4259,88 @@ Compiled drivers/phantomjs/runner.js (121ms) (pid 99381)
|
|
4259
4259
|
Compiled teabag/phantomjs/runner_spec.js (267ms) (pid 99381)
|
4260
4260
|
Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1612.8ms)
|
4261
4261
|
Completed 200 OK in 1623ms (Views: 1622.8ms)
|
4262
|
+
Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-27 17:03:28 -0700
|
4263
|
+
Processing by Teabag::SpecController#index as */*
|
4264
|
+
Parameters: {"suite"=>"foo"}
|
4265
|
+
Compiled spec_helper.js (190ms) (pid 3684)
|
4266
|
+
Compiled teabag/base/reporters/console_spec.js (136ms) (pid 3684)
|
4267
|
+
Compiled teabag/base/reporters/html/base_view_spec.js (125ms) (pid 3684)
|
4268
|
+
Compiled teabag/base/reporters/html/failure_view_spec.js (95ms) (pid 3684)
|
4269
|
+
Compiled teabag/base/reporters/html/progress_view_spec.js (97ms) (pid 3684)
|
4270
|
+
Compiled teabag/base/reporters/html/spec_view_spec.js (124ms) (pid 3684)
|
4271
|
+
Compiled teabag/base/reporters/html/suite_view_spec.js (96ms) (pid 3684)
|
4272
|
+
Compiled teabag/base/reporters/html_spec.js (170ms) (pid 3684)
|
4273
|
+
Compiled teabag/base/runner_spec.js (120ms) (pid 3684)
|
4274
|
+
Compiled teabag/base/teabag_spec.js (117ms) (pid 3684)
|
4275
|
+
Compiled drivers/phantomjs/runner.js (122ms) (pid 3684)
|
4276
|
+
Compiled teabag/phantomjs/runner_spec.js (270ms) (pid 3684)
|
4277
|
+
Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1702.7ms)
|
4278
|
+
Completed 200 OK in 1716ms (Views: 1715.8ms)
|
4279
|
+
Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-27 21:58:58 -0700
|
4280
|
+
Processing by Teabag::SpecController#index as */*
|
4281
|
+
Parameters: {"suite"=>"foo"}
|
4282
|
+
Compiled spec_helper.js (236ms) (pid 7474)
|
4283
|
+
Compiled teabag/base/reporters/console_spec.js (136ms) (pid 7474)
|
4284
|
+
Compiled teabag/base/reporters/html/base_view_spec.js (124ms) (pid 7474)
|
4285
|
+
Compiled teabag/base/reporters/html/failure_view_spec.js (95ms) (pid 7474)
|
4286
|
+
Compiled teabag/base/reporters/html/progress_view_spec.js (98ms) (pid 7474)
|
4287
|
+
Compiled teabag/base/reporters/html/spec_view_spec.js (96ms) (pid 7474)
|
4288
|
+
Compiled teabag/base/reporters/html/suite_view_spec.js (95ms) (pid 7474)
|
4289
|
+
Compiled teabag/base/reporters/html_spec.js (172ms) (pid 7474)
|
4290
|
+
Compiled teabag/base/runner_spec.js (120ms) (pid 7474)
|
4291
|
+
Compiled teabag/base/teabag_spec.js (112ms) (pid 7474)
|
4292
|
+
Compiled drivers/phantomjs/runner.js (121ms) (pid 7474)
|
4293
|
+
Compiled teabag/phantomjs/runner_spec.js (298ms) (pid 7474)
|
4294
|
+
Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1743.5ms)
|
4295
|
+
Completed 200 OK in 1757ms (Views: 1757.1ms)
|
4296
|
+
Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-28 01:24:24 -0700
|
4297
|
+
Processing by Teabag::SpecController#index as */*
|
4298
|
+
Parameters: {"suite"=>"foo"}
|
4299
|
+
Compiled spec_helper.js (123ms) (pid 1411)
|
4300
|
+
Compiled teabag/base/reporters/console_spec.js (133ms) (pid 1411)
|
4301
|
+
Compiled teabag/base/reporters/html/base_view_spec.js (128ms) (pid 1411)
|
4302
|
+
Compiled teabag/base/reporters/html/failure_view_spec.js (102ms) (pid 1411)
|
4303
|
+
Compiled teabag/base/reporters/html/progress_view_spec.js (92ms) (pid 1411)
|
4304
|
+
Compiled teabag/base/reporters/html/spec_view_spec.js (121ms) (pid 1411)
|
4305
|
+
Compiled teabag/base/reporters/html/suite_view_spec.js (93ms) (pid 1411)
|
4306
|
+
Compiled teabag/base/reporters/html_spec.js (166ms) (pid 1411)
|
4307
|
+
Compiled teabag/base/runner_spec.js (118ms) (pid 1411)
|
4308
|
+
Compiled teabag/base/teabag_spec.js (118ms) (pid 1411)
|
4309
|
+
Compiled drivers/phantomjs/runner.js (125ms) (pid 1411)
|
4310
|
+
Compiled teabag/phantomjs/runner_spec.js (278ms) (pid 1411)
|
4311
|
+
Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1631.2ms)
|
4312
|
+
Completed 200 OK in 1645ms (Views: 1644.6ms)
|
4313
|
+
Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-28 01:27:28 -0700
|
4314
|
+
Processing by Teabag::SpecController#index as */*
|
4315
|
+
Parameters: {"suite"=>"foo"}
|
4316
|
+
Compiled spec_helper.js (100ms) (pid 1524)
|
4317
|
+
Compiled teabag/base/reporters/console_spec.js (131ms) (pid 1524)
|
4318
|
+
Compiled teabag/base/reporters/html/base_view_spec.js (131ms) (pid 1524)
|
4319
|
+
Compiled teabag/base/reporters/html/failure_view_spec.js (94ms) (pid 1524)
|
4320
|
+
Compiled teabag/base/reporters/html/progress_view_spec.js (121ms) (pid 1524)
|
4321
|
+
Compiled teabag/base/reporters/html/spec_view_spec.js (92ms) (pid 1524)
|
4322
|
+
Compiled teabag/base/reporters/html/suite_view_spec.js (100ms) (pid 1524)
|
4323
|
+
Compiled teabag/base/reporters/html_spec.js (166ms) (pid 1524)
|
4324
|
+
Compiled teabag/base/runner_spec.js (116ms) (pid 1524)
|
4325
|
+
Compiled teabag/base/teabag_spec.js (139ms) (pid 1524)
|
4326
|
+
Compiled drivers/phantomjs/runner.js (117ms) (pid 1524)
|
4327
|
+
Compiled teabag/phantomjs/runner_spec.js (258ms) (pid 1524)
|
4328
|
+
Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1568.0ms)
|
4329
|
+
Completed 200 OK in 1577ms (Views: 1577.0ms)
|
4330
|
+
Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-28 14:27:39 -0700
|
4331
|
+
Processing by Teabag::SpecController#index as */*
|
4332
|
+
Parameters: {"suite"=>"foo"}
|
4333
|
+
Compiled spec_helper.js (105ms) (pid 9031)
|
4334
|
+
Compiled teabag/base/reporters/console_spec.js (133ms) (pid 9031)
|
4335
|
+
Compiled teabag/base/reporters/html/base_view_spec.js (123ms) (pid 9031)
|
4336
|
+
Compiled teabag/base/reporters/html/failure_view_spec.js (97ms) (pid 9031)
|
4337
|
+
Compiled teabag/base/reporters/html/progress_view_spec.js (124ms) (pid 9031)
|
4338
|
+
Compiled teabag/base/reporters/html/spec_view_spec.js (95ms) (pid 9031)
|
4339
|
+
Compiled teabag/base/reporters/html/suite_view_spec.js (94ms) (pid 9031)
|
4340
|
+
Compiled teabag/base/reporters/html_spec.js (168ms) (pid 9031)
|
4341
|
+
Compiled teabag/base/runner_spec.js (118ms) (pid 9031)
|
4342
|
+
Compiled teabag/base/teabag_spec.js (140ms) (pid 9031)
|
4343
|
+
Compiled drivers/phantomjs/runner.js (120ms) (pid 9031)
|
4344
|
+
Compiled teabag/phantomjs/runner_spec.js (267ms) (pid 9031)
|
4345
|
+
Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (1596.3ms)
|
4346
|
+
Completed 200 OK in 1628ms (Views: 1627.5ms)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,4 @@
|
|
1
|
+
{
|
2
|
+
"title": "Title",
|
3
|
+
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur auctor, erat vel porta consectetur, erat lectus venenatis arcu, vel vehicula ipsum dui sed neque. Cras eros arcu, fermentum non semper quis, placerat sit amet metus. Mauris id mi nec tortor varius tristique sed in urna. Pellentesque vitae augue eu libero dignissim gravida sed quis neque. Aenean gravida sollicitudin nibh quis hendrerit. Donec justo dui, rutrum pharetra sodales a, fermentum quis erat. Nulla cursus, quam eget volutpat convallis, risus libero semper libero, sed commodo lorem ligula quis quam. In hac habitasse platea dictumst. Nulla facilisi. In eget dolor felis. Aliquam varius mi ac magna congue fermentum."
|
4
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
describe "Teabag.fixture", ->
|
2
|
+
|
3
|
+
beforeEach ->
|
4
|
+
fixture.cache = {}
|
5
|
+
fixture.cleanup()
|
6
|
+
@mockXhr =
|
7
|
+
readyState: 4
|
8
|
+
status: 200
|
9
|
+
responseText: "_content_"
|
10
|
+
getResponseHeader: -> "_type_"
|
11
|
+
open: ->
|
12
|
+
send: ->
|
13
|
+
@xhrSpy = spyOn(@mockXhr, 'open')
|
14
|
+
@xhrSpy
|
15
|
+
try spyOn(window, 'XMLHttpRequest').andReturn(@mockXhr)
|
16
|
+
catch e
|
17
|
+
spyOn(window, 'ActiveXObject').andReturn(@mockXhr)
|
18
|
+
|
19
|
+
|
20
|
+
describe "@load", ->
|
21
|
+
|
22
|
+
it "loads all of the files requested", ->
|
23
|
+
fixture.load("fixture.html", "fixture.json")
|
24
|
+
expect(@xhrSpy).toHaveBeenCalledWith("GET", "/teabag/fixtures/fixture.html", false)
|
25
|
+
expect(@xhrSpy).toHaveBeenCalledWith("GET", "/teabag/fixtures/fixture.json", false)
|
26
|
+
|
27
|
+
it "caches the type/contents of those files", ->
|
28
|
+
fixture.load("fixture.html")
|
29
|
+
@mockXhr.onreadystatechange()
|
30
|
+
expect(fixture.cache["fixture.html"]).toEqual(type: "_type_", content: "_content_")
|
31
|
+
|
32
|
+
it "throws an exception if unable to load a file", ->
|
33
|
+
fixture.load("foo.html")
|
34
|
+
@mockXhr.status = 500
|
35
|
+
expect(=> @mockXhr.onreadystatechange()).toThrow("Unable to load fixture \"foo.html\".")
|
36
|
+
|
37
|
+
it "adds the contents of files to a fixture element", ->
|
38
|
+
fixture.load("fixture.html")
|
39
|
+
@mockXhr.onreadystatechange()
|
40
|
+
expect(document.getElementById("teabag-fixtures").tagName).toBe("DIV")
|
41
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content_")
|
42
|
+
expect(document.getElementById("teabag-fixtures")).toBe(fixture.el)
|
43
|
+
|
44
|
+
it "allows appending file contents to the fixture element", ->
|
45
|
+
fixture.load("fixture.html1")
|
46
|
+
@mockXhr.onreadystatechange()
|
47
|
+
expect(document.getElementById("teabag-fixtures").tagName).toBe("DIV")
|
48
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content_")
|
49
|
+
fixture.load("fixture.html2", true)
|
50
|
+
@mockXhr.onreadystatechange()
|
51
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content__content_")
|
52
|
+
fixture.load("fixture.html3", false)
|
53
|
+
@mockXhr.onreadystatechange()
|
54
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content_")
|
55
|
+
|
56
|
+
it "handles JSON fixtures", ->
|
57
|
+
@mockXhr.responseText = '{"foo": "bar"}'
|
58
|
+
@mockXhr.getResponseHeader = -> "application/json; encoding-blah"
|
59
|
+
fixture.load("fixture.json")
|
60
|
+
@mockXhr.onreadystatechange()
|
61
|
+
expect(fixture.json.length).toBe(1)
|
62
|
+
expect(fixture.json[0]).toEqual(foo: "bar")
|
63
|
+
|
64
|
+
|
65
|
+
describe "@set", ->
|
66
|
+
|
67
|
+
it "adds all the contents passed to a fixture element", ->
|
68
|
+
fixture.set("_content1_", "_content2_")
|
69
|
+
expect(document.getElementById("teabag-fixtures").tagName).toBe("DIV")
|
70
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content1__content2_")
|
71
|
+
|
72
|
+
it "allows appending contents to the fixture element", ->
|
73
|
+
fixture.set("_content1_")
|
74
|
+
expect(document.getElementById("teabag-fixtures").tagName).toBe("DIV")
|
75
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content1_")
|
76
|
+
fixture.set("_content2_", true)
|
77
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content1__content2_")
|
78
|
+
fixture.set("_content3_", false)
|
79
|
+
expect(document.getElementById("teabag-fixtures").innerHTML).toBe("_content3_")
|
80
|
+
|
81
|
+
|
82
|
+
describe "@preload", ->
|
83
|
+
|
84
|
+
it "loads all of the files requested", ->
|
85
|
+
fixture.preload("fixture.html", "fixture.json")
|
86
|
+
expect(@xhrSpy).toHaveBeenCalledWith("GET", "/teabag/fixtures/fixture.html", false)
|
87
|
+
expect(@xhrSpy).toHaveBeenCalledWith("GET", "/teabag/fixtures/fixture.json", false)
|
88
|
+
expect(document.getElementById("teabag-fixtures")).toBe(null)
|
89
|
+
|
90
|
+
it "caches the type/contents of those files", ->
|
91
|
+
fixture.preload("fixture.html")
|
92
|
+
@mockXhr.onreadystatechange()
|
93
|
+
expect(fixture.cache["fixture.html"]).toEqual(type: "_type_", content: "_content_")
|
@@ -42,3 +42,19 @@ describe "Teabag running Jasmine", ->
|
|
42
42
|
|
43
43
|
it "is something cool", ->
|
44
44
|
expect(passing).toEqual(true)
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
fixture.preload("fixture.html", "fixture.json") # make the actual requests for the files
|
49
|
+
describe "Using fixtures", ->
|
50
|
+
|
51
|
+
fixture.set("<h2>Another Title</h2>") # create some markup manually (will be in a beforeEach)
|
52
|
+
|
53
|
+
beforeEach ->
|
54
|
+
@fixtures = fixture.load("fixture.html", "fixture.json", true) # append these fixtures
|
55
|
+
|
56
|
+
it "loads fixtures", ->
|
57
|
+
expect($("h1", fixture.el).text()).toBe("Title") # using fixture.el as a jquery scope
|
58
|
+
expect($("h2", fixture.el).text()).toBe("Another Title")
|
59
|
+
expect(@fixtures[0]).toBe(fixture.el) # the element is available as a return value and through fixture.el
|
60
|
+
expect(@fixtures[1]).toEqual(fixture.json[0]) # the json for json fixtures is returned, and available in fixture.json
|
@@ -9,9 +9,8 @@ describe "Teabag running Mocha", ->
|
|
9
9
|
describe "running tests", ->
|
10
10
|
|
11
11
|
it "actually tests", ->
|
12
|
-
|
13
|
-
|
14
|
-
#expect($("#fixture_view")).toExist()
|
12
|
+
fixture("fixture.html")
|
13
|
+
expect(document.getElementById("fixture_view").tagName).to.be("DIV")
|
15
14
|
|
16
15
|
it "can handle more than one test", (done) ->
|
17
16
|
test = ->
|
@@ -45,3 +44,17 @@ describe "Teabag running Mocha", ->
|
|
45
44
|
|
46
45
|
it "is something cool", ->
|
47
46
|
expect(passing).to.equal(true)
|
47
|
+
|
48
|
+
|
49
|
+
fixture.preload("fixture.html", "fixture.json") # make the actual requests for the files
|
50
|
+
describe "Using fixtures", ->
|
51
|
+
|
52
|
+
fixture.set("<h2>Another Title</h2>") # create some markup manually (will be in a beforeEach)
|
53
|
+
|
54
|
+
beforeEach ->
|
55
|
+
@fixtures = fixture.load("fixture.html", "fixture.json", true) # append these fixtures
|
56
|
+
|
57
|
+
it "loads fixtures", ->
|
58
|
+
expect(document.getElementById("fixture_view").tagName).to.be("DIV")
|
59
|
+
expect(@fixtures[0]).to.be(fixture.el) # the element is available as a return value and through fixture.el
|
60
|
+
expect(@fixtures[1]).to.eql(fixture.json[0]) # the json for json fixtures is returned, and available in fixture.json
|
data/spec/teabag/suite_spec.rb
CHANGED
@@ -41,11 +41,33 @@ describe Teabag::Suite do
|
|
41
41
|
describe "#javascripts" do
|
42
42
|
|
43
43
|
it "returns an array of javascripts" do
|
44
|
-
|
44
|
+
results = subject.javascripts
|
45
|
+
expect(results).to include("teabag-jasmine")
|
46
|
+
expect(results).to include("spec_helper")
|
45
47
|
end
|
46
48
|
|
47
49
|
end
|
48
50
|
|
51
|
+
describe "#core_javascripts" do
|
52
|
+
|
53
|
+
it "returns an array of javascripts" do
|
54
|
+
results = subject.core_javascripts
|
55
|
+
expect(results).to eql(["teabag-jasmine"])
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
describe "#spec_javascripts" do
|
61
|
+
|
62
|
+
it "returns an array of javascripts" do
|
63
|
+
results = subject.spec_javascripts
|
64
|
+
expect(results).to include("spec_helper")
|
65
|
+
expect(results).to include("teabag/base/reporters/console_spec.js")
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
|
49
71
|
describe "#stylesheets" do
|
50
72
|
|
51
73
|
it "returns an array of stylesheets" do
|