konacha 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f481eeaec9479ab6eb9f68522b8cb08bcc45423
4
- data.tar.gz: ace8efe10d67b0c0a008336285c16dcc4cf8b42c
3
+ metadata.gz: 36311ae558453159340bea0897754fd2049c32d6
4
+ data.tar.gz: 91fdaad2ace9858ba1e4b74c6bb0e7baaafd6d86
5
5
  SHA512:
6
- metadata.gz: ecf455aea2371dd57e39828c7e32c394c770967a333daf9f820b834084cdcaee3e0355f99dc2bb060acb884bf2f428524b48850af68b704eb6aa7b9b3ea72850
7
- data.tar.gz: 9edb1ac5306f73a21ca24d5da818d10c3125dfb7f8f5be331412e7cdf78f300752e7196839cdc72f59663f4421b5dd5a16c10d9b3da4000cfe7ed4abe75f41f0
6
+ metadata.gz: 9695c5516a0050ce9b3ca0373d0907dbb1285f4e92b1b1b5998929dd5e9cfdc16e32e6c314537b543a78be6eb7da24a9ec303c6851f4f62476e33a05f54b5d22
7
+ data.tar.gz: 9730de6297ae4d0677cff670e35fea4c3fabb96cb587341a94425ffdd329838a4a36f381a67c8fd05f77fcd77a37c9d616fc6b5637378cb988d8354644c3f912
data/History.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # master
2
2
 
3
+ # 3.2.2
4
+
5
+ * Override mocha links to utilize the konacha path parameter (#168)
6
+
3
7
  # 3.2.1
4
8
 
5
9
  * Update chai (1.9.1)
data/README.md CHANGED
@@ -295,12 +295,13 @@ localhost:3500 when you refresh your browser.
295
295
 
296
296
  You can send pull requests to Mocha and Chai straight out of your submodules.
297
297
 
298
- ## License
298
+ ## See Also
299
299
 
300
- Copyright (c) 2012 John Firebaugh
300
+ Prior art:
301
301
 
302
- MIT License (see the LICENSE file)
302
+ * [Jasmine](https://github.com/pivotal/jasmine-gem)
303
+ * [Evergreen](https://github.com/jnicklas/evergreen)
303
304
 
304
- Portions: Copyright (c) 2009 Jonas Nicklas, Copyright (c) 20011-2012 TJ Holowaychuk
305
- <tj@vision-media.ca>, Copyright (c) 2011 Jake Luer <jake@alogicalparadox.com>. See
306
- LICENSE file for details.
305
+ Similar projects:
306
+
307
+ * [Teaspoon](https://github.com/modeset/teaspoon)
@@ -4,6 +4,23 @@ window.onload = function () {
4
4
  return a.path.localeCompare(b.path);
5
5
  });
6
6
 
7
+ var originalTestUrl = Mocha.reporters.HTML.prototype.testURL;
8
+
9
+ Mocha.reporters.HTML.prototype.suiteURL = function(suite) {
10
+ var specFilePath,
11
+ grepString = originalTestUrl(suite),
12
+ currentSuite = suite;
13
+
14
+ while (!(specFilePath = currentSuite.path)) {
15
+ currentSuite = currentSuite.parent
16
+ }
17
+
18
+ specFilePath = /([^\.]*)/.exec(specFilePath)[1];
19
+ return location.protocol+'//'+location.host+'/'+specFilePath+grepString;
20
+ };
21
+
22
+ Mocha.reporters.HTML.prototype.testURL = Mocha.reporters.HTML.prototype.suiteURL;
23
+
7
24
  // Check that all iframes loaded successfully.
8
25
  var iframes = document.getElementsByTagName('iframe');
9
26
  for (var i = 0; i < iframes.length; ++i) {
@@ -17,7 +17,7 @@ the asset pipeline and engines.}
17
17
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  gem.name = "konacha"
19
19
  gem.require_paths = ["lib"]
20
- gem.version = "3.2.1"
20
+ gem.version = "3.2.2"
21
21
  gem.license = "MIT"
22
22
 
23
23
  gem.add_dependency "railties", ">= 3.1", "< 5"
@@ -0,0 +1,4 @@
1
+ # Utilized in spec/mocha_links_spec
2
+ describe "A test suite", ->
3
+ it "A known test name", ->
4
+ 1.should.equal(1)
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ describe Konacha, type: :feature do
4
+ before { Konacha.mode = :server }
5
+
6
+ describe 'suite/test links' do
7
+ let(:spec_file) { 'empty_suite_and_test_spec' }
8
+ let(:suite_name) { 'A test suite' }
9
+ let(:test_name) { 'A known test name' }
10
+
11
+ before { visit '/' }
12
+
13
+ describe 'suite link' do
14
+ subject{ page.find_link('A test suite') }
15
+
16
+ it 'should contain spec path and grep string' do
17
+ subject['href'].should == "#{page.current_url}#{spec_file}?grep=#{URI.encode(suite_name)}"
18
+ end
19
+ end
20
+
21
+ describe 'replay link (arrow icon)' do
22
+ subject{ page.find(%Q{a[href="#{page.current_url}#{spec_file}?grep=#{URI.encode([suite_name, test_name].join(' '))}"]}) }
23
+
24
+ it 'should contain spec path and grep string' do
25
+ subject.should_not be_nil
26
+ end
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konacha
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Firebaugh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-20 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -267,6 +267,7 @@ files:
267
267
  - spec/dummy/spec/javascripts/body_spec.js.coffee
268
268
  - spec/dummy/spec/javascripts/do_not_include_spec.js.bak
269
269
  - spec/dummy/spec/javascripts/do_not_include_spec.png
270
+ - spec/dummy/spec/javascripts/empty_suite_and_test_spec.js.coffee
270
271
  - spec/dummy/spec/javascripts/failing_spec.js
271
272
  - spec/dummy/spec/javascripts/file-with-hyphens-spec.js
272
273
  - spec/dummy/spec/javascripts/file.with.periods.spec.js
@@ -285,6 +286,7 @@ files:
285
286
  - spec/error_handling_spec.rb
286
287
  - spec/formatter_spec.rb
287
288
  - spec/konacha_spec.rb
289
+ - spec/mocha_links_spec.rb
288
290
  - spec/models/spec_spec.rb
289
291
  - spec/reporter/example_group_spec.rb
290
292
  - spec/reporter/example_spec.rb
@@ -341,6 +343,7 @@ test_files:
341
343
  - spec/dummy/spec/javascripts/body_spec.js.coffee
342
344
  - spec/dummy/spec/javascripts/do_not_include_spec.js.bak
343
345
  - spec/dummy/spec/javascripts/do_not_include_spec.png
346
+ - spec/dummy/spec/javascripts/empty_suite_and_test_spec.js.coffee
344
347
  - spec/dummy/spec/javascripts/failing_spec.js
345
348
  - spec/dummy/spec/javascripts/file-with-hyphens-spec.js
346
349
  - spec/dummy/spec/javascripts/file.with.periods.spec.js
@@ -359,6 +362,7 @@ test_files:
359
362
  - spec/error_handling_spec.rb
360
363
  - spec/formatter_spec.rb
361
364
  - spec/konacha_spec.rb
365
+ - spec/mocha_links_spec.rb
362
366
  - spec/models/spec_spec.rb
363
367
  - spec/reporter/example_group_spec.rb
364
368
  - spec/reporter/example_spec.rb