jasmine 2.0.3 → 2.1.0

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: 802718348ddd679b80993ea341baa900a242a88a
4
- data.tar.gz: 1c111697927bcdda6dcde1ed52017c062680a8ca
3
+ metadata.gz: b7ad2fbff53956500c93901508a21b675e40e75c
4
+ data.tar.gz: 64d908f89bb6a06594818ee127bd3300ea086753
5
5
  SHA512:
6
- metadata.gz: 3dab4e334f2286eff80cc75e8bdce6b60d3a8377bc159e2266c197807c75fa561fb2c15c7198ad05fb6bf359a3322b60bfa52effd1a378ece4b2aa4be271ce51
7
- data.tar.gz: 1d07d043a1d1a686e8b0f2e0dc3e97837278b99417449bbd40efb3fe65006c44a54addf378af1728abee52b1c8ebd839d90cf6cff67e2c90e9b6251f5619d10e
6
+ metadata.gz: af846c0089929a96cc615687ce90858ed7bd7780694c2a526e5194d11f73ba179c42ba103e47332072e82abe74dcab85b901a0bd8c4b8314e5a4f42beb370866
7
+ data.tar.gz: 4010ae21deaba06f30b9d36f70f21533adb5f6527d3bf96cf2d6053e45bd2df29dbcf0fa14eea10f9497d256bb5764a90a5fe83b8f1f4928f702a751ee7607a2
data/jasmine.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency 'rspec', '>= 2.5.0'
34
34
  s.add_development_dependency 'nokogiri'
35
35
 
36
- s.add_dependency 'jasmine-core', '~> 2.0.0'
36
+ s.add_dependency 'jasmine-core', '~> 2.1.0'
37
37
  s.add_dependency 'rack', '>= 1.2.1'
38
38
  s.add_dependency 'rake'
39
39
  s.add_dependency 'phantomjs'
@@ -1,10 +1,14 @@
1
1
  function PhantomReporter() {
2
2
  this.jasmineDone = function() {
3
- window.callPhantom({ state: 'jasmineDone' });
3
+ window.callPhantom({ state: 'jasmineDone' });
4
4
  };
5
5
 
6
6
  this.specDone = function(results) {
7
- window.callPhantom({ state: 'specDone', results: results});
7
+ window.callPhantom({ state: 'specDone', results: results });
8
+ };
9
+
10
+ this.suiteDone = function(results) {
11
+ window.callPhantom({ state: 'suiteDone', results: results });
8
12
  };
9
13
  }
10
14
 
@@ -16,7 +16,9 @@
16
16
 
17
17
  page.onCallback = function(data) {
18
18
  if(data.state === 'specDone') {
19
- console.log('jasmine_result' + JSON.stringify([].concat(data.results)));
19
+ console.log('jasmine_spec_result' + JSON.stringify([].concat(data.results)));
20
+ } else if (data.state === 'suiteDone') {
21
+ console.log('jasmine_suite_result' + JSON.stringify([].concat(data.results)));
20
22
  } else {
21
23
  phantom.exit(0);
22
24
  }
@@ -16,11 +16,19 @@ module Jasmine
16
16
  command = "#{phantom_js_path} '#{phantom_script}' #{jasmine_server_url} #{show_console_log} '#{@phantom_config_script}'"
17
17
  IO.popen(command) do |output|
18
18
  output.each do |line|
19
- if line =~ /^jasmine_result/
20
- line = line.sub(/^jasmine_result/, '')
19
+ if line =~ /^jasmine_spec_result/
20
+ line = line.sub(/^jasmine_spec_result/, '')
21
21
  raw_results = JSON.parse(line, :max_nesting => false)
22
22
  results = raw_results.map { |r| Result.new(r) }
23
23
  formatter.format(results)
24
+ elsif line =~ /^jasmine_suite_result/
25
+ line = line.sub(/^jasmine_suite_result/, '')
26
+ raw_results = JSON.parse(line, :max_nesting => false)
27
+ results = raw_results.map { |r| Result.new(r) }
28
+ failures = results.select(&:failed?)
29
+ if failures.any?
30
+ formatter.format(failures)
31
+ end
24
32
  elsif line =~ /^Failed to configure phantom$/
25
33
  config_failure = Result.new('fullName' => line,
26
34
  'failedExpectations' => [],
@@ -1,3 +1,3 @@
1
1
  module Jasmine
2
- VERSION = "2.0.3"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -0,0 +1,11 @@
1
+ # Jasmine Gem 2.1.0 Release Notes
2
+
3
+ ## Summary
4
+
5
+ This release updates the jasmine-core dependency to 2.1.0. See the
6
+ [jasmine-core release notes](https://github.com/pivotal/jasmine/blob/master/release_notes/2.1.0.md)
7
+ for more information.
8
+
9
+ ------
10
+
11
+ _Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
@@ -0,0 +1,8 @@
1
+ describe('failing afterAll', function() {
2
+ afterAll(function() {
3
+ throw 'afterAll go boom';
4
+ });
5
+
6
+ it('is fine otherwise', function() {
7
+ });
8
+ });
@@ -100,4 +100,12 @@ describe "POJS jasmine install" do
100
100
  $?.should_not be_success
101
101
  output.should =~ /Failed to configure phantom/
102
102
  end
103
+
104
+ it 'should fail correctly with a failure in afterAll' do
105
+ FileUtils.cp(File.join(@root, 'spec', 'fixture', 'afterall_spec.js'), File.join('spec', 'javascripts'))
106
+
107
+ output = `rake jasmine:ci`
108
+ $?.should_not be_success
109
+ output.should =~ /afterAll go boom/
110
+ end
103
111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajan Agaskar
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-09-19 00:00:00.000000000 Z
13
+ date: 2014-11-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - ~>
90
90
  - !ruby/object:Gem::Version
91
- version: 2.0.0
91
+ version: 2.1.0
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ~>
97
97
  - !ruby/object:Gem::Version
98
- version: 2.0.0
98
+ version: 2.1.0
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rack
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -205,11 +205,13 @@ files:
205
205
  - release_notes/v2.0.1.md
206
206
  - release_notes/v2.0.2.md
207
207
  - release_notes/v2.0.3.md
208
+ - release_notes/v2.1.0.md
208
209
  - spec/application_integration_spec.rb
209
210
  - spec/application_spec.rb
210
211
  - spec/base_spec.rb
211
212
  - spec/configuration_spec.rb
212
213
  - spec/fixture/Rakefile
214
+ - spec/fixture/afterall_spec.js
213
215
  - spec/fixture/coffee_spec.coffee
214
216
  - spec/fixture/console_log_spec.js
215
217
  - spec/fixture/exception_test.js
@@ -265,6 +267,7 @@ test_files:
265
267
  - spec/base_spec.rb
266
268
  - spec/configuration_spec.rb
267
269
  - spec/fixture/Rakefile
270
+ - spec/fixture/afterall_spec.js
268
271
  - spec/fixture/coffee_spec.coffee
269
272
  - spec/fixture/console_log_spec.js
270
273
  - spec/fixture/exception_test.js