jasmine 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jasmine.gemspec +1 -1
- data/lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine.yml +11 -0
- data/lib/jasmine/asset_expander.rb +4 -4
- data/lib/jasmine/ci_runner.rb +3 -1
- data/lib/jasmine/config.rb +1 -0
- data/lib/jasmine/configuration.rb +2 -0
- data/lib/jasmine/dependencies.rb +10 -19
- data/lib/jasmine/formatters/console.rb +5 -1
- data/lib/jasmine/formatters/exit_code.rb +1 -1
- data/lib/jasmine/formatters/multi.rb +2 -2
- data/lib/jasmine/runners/phantom_boot.js +2 -2
- data/lib/jasmine/runners/phantom_jasmine_run.js +1 -0
- data/lib/jasmine/runners/phantom_js.rb +6 -2
- data/lib/jasmine/tasks/jasmine.rake +4 -4
- data/lib/jasmine/version.rb +1 -1
- data/lib/jasmine/yaml_config_parser.rb +4 -0
- data/release_notes/v2.4.0.md +20 -0
- data/spec/ci_runner_spec.rb +43 -3
- data/spec/jasmine_pojs_spec.rb +13 -0
- data/spec/lib/jasmine/formatters/console_spec.rb +23 -11
- data/spec/lib/jasmine/formatters/multi_spec.rb +5 -3
- metadata +30 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff37a8a0b4e7f15fb350194406360300f16c145d
|
4
|
+
data.tar.gz: 294bf35be0b19f6db43c4dde6197d31a954563db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afb5493aeb86c4cc6347bb0b214c67d4a1eedb7ac05b4e5cdef3e0441f121c8b5366e1a83b22310ddcc04c9310778ed87302344b60ddb48ed05811fd4cdd3ebe
|
7
|
+
data.tar.gz: 8406f91af81474b6089da889fd55c9fef374e3d6572443abe405c1e85af8e0743f3c37618e89937901db481b279a23cc2b4cf1a5ae18e116d8f26e4257c2dbe4
|
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.
|
36
|
+
s.add_dependency 'jasmine-core', '~> 2.4'
|
37
37
|
s.add_dependency 'rack', '>= 1.2.1'
|
38
38
|
s.add_dependency 'rake'
|
39
39
|
s.add_dependency 'phantomjs'
|
@@ -14,8 +14,8 @@ module Jasmine
|
|
14
14
|
|
15
15
|
def asset_bundle
|
16
16
|
return Rails3AssetBundle.new if Jasmine::Dependencies.rails3?
|
17
|
-
return
|
18
|
-
raise UnsupportedRailsVersion, "Jasmine only supports the asset pipeline for Rails 3
|
17
|
+
return Rails4Or5AssetBundle.new if Jasmine::Dependencies.rails4? || Jasmine::Dependencies.rails5?
|
18
|
+
raise UnsupportedRailsVersion, "Jasmine only supports the asset pipeline for Rails 3 - 5"
|
19
19
|
end
|
20
20
|
|
21
21
|
class Rails3AssetBundle
|
@@ -38,7 +38,7 @@ module Jasmine
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
class
|
41
|
+
class Rails4Or5AssetBundle
|
42
42
|
def assets(pathname)
|
43
43
|
context.get_original_assets(pathname)
|
44
44
|
end
|
@@ -51,7 +51,7 @@ module Jasmine
|
|
51
51
|
|
52
52
|
module GetOriginalAssetsHelper
|
53
53
|
def get_original_assets(pathname)
|
54
|
-
assets_environment.find_asset(pathname).
|
54
|
+
Array(assets_environment.find_asset(pathname)).map do |processed_asset|
|
55
55
|
case processed_asset.content_type
|
56
56
|
when "text/css"
|
57
57
|
path_to_stylesheet(processed_asset.logical_path, debug: true)
|
data/lib/jasmine/ci_runner.rb
CHANGED
@@ -6,6 +6,8 @@ module Jasmine
|
|
6
6
|
@application_factory = options.fetch(:application_factory, Jasmine::Application)
|
7
7
|
@server_factory = options.fetch(:server_factory, Jasmine::Server)
|
8
8
|
@outputter = options.fetch(:outputter, Kernel)
|
9
|
+
@random = options.fetch(:random, config.random)
|
10
|
+
@seed = options.has_key?(:seed) ? "&seed=#{options[:seed]}" : ''
|
9
11
|
end
|
10
12
|
|
11
13
|
def run
|
@@ -14,7 +16,7 @@ module Jasmine
|
|
14
16
|
exit_code_formatter = Jasmine::Formatters::ExitCode.new
|
15
17
|
formatters << exit_code_formatter
|
16
18
|
|
17
|
-
url = "#{config.host}:#{config.port(:ci)}/?throwFailures=#{config.stop_spec_on_expectation_failure}"
|
19
|
+
url = "#{config.host}:#{config.port(:ci)}/?throwFailures=#{config.stop_spec_on_expectation_failure}&random=#{@random}#{@seed}"
|
18
20
|
runner = config.runner.call(Jasmine::Formatters::Multi.new(formatters), url)
|
19
21
|
|
20
22
|
if runner.respond_to?(:boot_js)
|
data/lib/jasmine/config.rb
CHANGED
@@ -112,6 +112,7 @@ module Jasmine
|
|
112
112
|
|
113
113
|
config.show_console_log = yaml_config.show_console_log
|
114
114
|
config.stop_spec_on_expectation_failure = yaml_config.stop_spec_on_expectation_failure
|
115
|
+
config.random = yaml_config.random
|
115
116
|
config.phantom_config_script = yaml_config.phantom_config_script
|
116
117
|
|
117
118
|
config.rack_options = yaml_config.rack_options
|
@@ -12,6 +12,7 @@ module Jasmine
|
|
12
12
|
attr_accessor :prevent_phantom_js_auto_install
|
13
13
|
attr_accessor :show_console_log
|
14
14
|
attr_accessor :stop_spec_on_expectation_failure
|
15
|
+
attr_accessor :random
|
15
16
|
attr_accessor :phantom_config_script
|
16
17
|
attr_accessor :show_full_stack_trace
|
17
18
|
attr_reader :rack_apps
|
@@ -31,6 +32,7 @@ module Jasmine
|
|
31
32
|
@rack_options = {}
|
32
33
|
@show_console_log = false
|
33
34
|
@stop_spec_on_expectation_failure = false
|
35
|
+
@random = false
|
34
36
|
@phantom_config_script = nil
|
35
37
|
|
36
38
|
@formatters = [Jasmine::Formatters::Console]
|
data/lib/jasmine/dependencies.rb
CHANGED
@@ -3,38 +3,29 @@ module Jasmine
|
|
3
3
|
|
4
4
|
class << self
|
5
5
|
def rails3?
|
6
|
-
|
6
|
+
rails? && Rails.version.to_i == 3
|
7
7
|
end
|
8
8
|
|
9
9
|
def rails4?
|
10
|
-
|
10
|
+
rails? && Rails.version.to_i == 4
|
11
|
+
end
|
12
|
+
|
13
|
+
def rails5?
|
14
|
+
rails? && Rails.version.to_i == 5
|
11
15
|
end
|
12
16
|
|
13
17
|
def rails?
|
14
|
-
|
18
|
+
defined?(Rails) && Rails.respond_to?(:version)
|
15
19
|
end
|
20
|
+
|
16
21
|
def legacy_rack?
|
17
22
|
!defined?(Rack::Server)
|
18
23
|
end
|
19
24
|
|
20
25
|
def use_asset_pipeline?
|
21
|
-
assets_pipeline_available = (rails3? || rails4?) && Rails.respond_to?(:application) && Rails.application.respond_to?(:assets)
|
26
|
+
assets_pipeline_available = (rails3? || rails4? || rails5?) && Rails.respond_to?(:application) && Rails.application.respond_to?(:assets)
|
22
27
|
rails3_assets_enabled = rails3? && assets_pipeline_available && Rails.application.config.assets.enabled != false
|
23
|
-
assets_pipeline_available && (rails4? || rails3_assets_enabled)
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def running_rails3?
|
29
|
-
running_rails? && Rails.version.to_i == 3
|
30
|
-
end
|
31
|
-
|
32
|
-
def running_rails4?
|
33
|
-
running_rails? && Rails.version.to_i == 4
|
34
|
-
end
|
35
|
-
|
36
|
-
def running_rails?
|
37
|
-
defined?(Rails) && Rails.respond_to?(:version)
|
28
|
+
assets_pipeline_available && (rails4? || rails5? || rails3_assets_enabled)
|
38
29
|
end
|
39
30
|
end
|
40
31
|
end
|
@@ -11,7 +11,7 @@ module Jasmine
|
|
11
11
|
@results += results_batch
|
12
12
|
end
|
13
13
|
|
14
|
-
def done
|
14
|
+
def done(run_details)
|
15
15
|
outputter.puts
|
16
16
|
|
17
17
|
failure_count = results.count(&:failed?)
|
@@ -33,6 +33,10 @@ module Jasmine
|
|
33
33
|
summary += ", #{pluralize(pending_count, 'pending spec')}" if pending_count > 0
|
34
34
|
|
35
35
|
outputter.puts(summary)
|
36
|
+
|
37
|
+
if run_details['order'] && run_details['order']['random']
|
38
|
+
outputter.puts("Randomized with seed #{run_details['order']['seed']}")
|
39
|
+
end
|
36
40
|
end
|
37
41
|
|
38
42
|
private
|
@@ -14,7 +14,8 @@ module Jasmine
|
|
14
14
|
|
15
15
|
def run
|
16
16
|
phantom_script = File.join(File.dirname(__FILE__), 'phantom_jasmine_run.js')
|
17
|
-
command = "#{phantom_js_path} '#{phantom_script}' #{jasmine_server_url} #{show_console_log} '#{@phantom_config_script}'"
|
17
|
+
command = "#{phantom_js_path} '#{phantom_script}' \"#{jasmine_server_url}\" #{show_console_log} '#{@phantom_config_script}'"
|
18
|
+
run_details = { 'random' => false }
|
18
19
|
IO.popen(command) do |output|
|
19
20
|
output.each do |line|
|
20
21
|
if line =~ /^jasmine_spec_result/
|
@@ -30,6 +31,9 @@ module Jasmine
|
|
30
31
|
if failures.any?
|
31
32
|
formatter.format(failures)
|
32
33
|
end
|
34
|
+
elsif line =~ /^jasmine_done/
|
35
|
+
line = line.sub(/^jasmine_done/, '')
|
36
|
+
run_details = JSON.parse(line, :max_nesting => false)
|
33
37
|
elsif line =~ /^Failed to configure phantom$/
|
34
38
|
config_failure = Result.new('fullName' => line,
|
35
39
|
'failedExpectations' => [],
|
@@ -44,7 +48,7 @@ module Jasmine
|
|
44
48
|
end
|
45
49
|
end
|
46
50
|
end
|
47
|
-
formatter.done
|
51
|
+
formatter.done(run_details)
|
48
52
|
end
|
49
53
|
|
50
54
|
def phantom_js_path
|
@@ -41,9 +41,9 @@ namespace :jasmine do
|
|
41
41
|
|
42
42
|
task :configure_plugins
|
43
43
|
|
44
|
-
desc 'Run
|
45
|
-
task :ci => %w(jasmine:require_json jasmine:require jasmine:configure jasmine:configure_plugins) do
|
46
|
-
ci_runner = Jasmine::CiRunner.new(Jasmine.config)
|
44
|
+
desc 'Run jasmine tests in a browser, random and seed override config'
|
45
|
+
task :ci, [:random, :seed] => %w(jasmine:require_json jasmine:require jasmine:configure jasmine:configure_plugins) do |t, args|
|
46
|
+
ci_runner = Jasmine::CiRunner.new(Jasmine.config, args.to_hash)
|
47
47
|
exit(1) unless ci_runner.run
|
48
48
|
end
|
49
49
|
|
@@ -59,5 +59,5 @@ namespace :jasmine do
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
desc '
|
62
|
+
desc 'Start server to host jasmine specs'
|
63
63
|
task :jasmine => %w(jasmine:server)
|
data/lib/jasmine/version.rb
CHANGED
@@ -67,6 +67,10 @@ module Jasmine
|
|
67
67
|
loaded_yaml['stop_spec_on_expectation_failure'] || false
|
68
68
|
end
|
69
69
|
|
70
|
+
def random
|
71
|
+
loaded_yaml['random'] || false
|
72
|
+
end
|
73
|
+
|
70
74
|
def phantom_config_script
|
71
75
|
return nil unless loaded_yaml['phantom_config_script']
|
72
76
|
File.join @pwd, loaded_yaml['phantom_config_script']
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Jasmine Gem 2.4.0 Release Notes
|
2
|
+
|
3
|
+
## Summary
|
4
|
+
|
5
|
+
This release updated the jasmine-core dependency to 2.4.0. See the
|
6
|
+
[jasmine-core release notes](https://github.com/jasmine/jasmine/blob/master/release_notes/2.4.0.md)
|
7
|
+
for more information
|
8
|
+
|
9
|
+
## Changes
|
10
|
+
|
11
|
+
* Allow jasmine:ci to run in random order
|
12
|
+
|
13
|
+
## Pull Requests & Issues
|
14
|
+
|
15
|
+
* Rails 5 support
|
16
|
+
- Merges #254 from @tjgrathwell
|
17
|
+
|
18
|
+
------
|
19
|
+
|
20
|
+
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
data/spec/ci_runner_spec.rb
CHANGED
@@ -11,7 +11,8 @@ describe Jasmine::CiRunner do
|
|
11
11
|
:host => 'foo.bar.com',
|
12
12
|
:port => '1234',
|
13
13
|
:rack_options => 'rack options',
|
14
|
-
:stop_spec_on_expectation_failure => false
|
14
|
+
:stop_spec_on_expectation_failure => false,
|
15
|
+
:random => false
|
15
16
|
)
|
16
17
|
end
|
17
18
|
|
@@ -41,7 +42,8 @@ describe Jasmine::CiRunner do
|
|
41
42
|
expect(config).to have_received(:port).with(:ci).at_least(:once)
|
42
43
|
expect(config).not_to have_received(:port).with(:server)
|
43
44
|
|
44
|
-
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi),
|
45
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bthrowFailures=false\b/)
|
46
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\brandom=false\b/)
|
45
47
|
|
46
48
|
expect(application_factory).to have_received(:app).with(config)
|
47
49
|
expect(server_factory).to have_received(:new).with('1234', 'my fake app', 'rack options')
|
@@ -92,6 +94,44 @@ describe Jasmine::CiRunner do
|
|
92
94
|
|
93
95
|
ci_runner.run
|
94
96
|
|
95
|
-
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi),
|
97
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bthrowFailures=true\b/)
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'can tell the jasmine page to randomize' do
|
101
|
+
allow(config).to receive(:random) { true }
|
102
|
+
|
103
|
+
ci_runner = Jasmine::CiRunner.new(config, thread: fake_thread, application_factory: application_factory, server_factory: server_factory, outputter: outputter)
|
104
|
+
|
105
|
+
ci_runner.run
|
106
|
+
|
107
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\brandom=true\b/)
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'allows randomization to be turned on, overriding the config' do
|
111
|
+
allow(config).to receive(:random) { false }
|
112
|
+
|
113
|
+
ci_runner = Jasmine::CiRunner.new(config, random: true, thread: fake_thread, application_factory: application_factory, server_factory: server_factory, outputter: outputter)
|
114
|
+
|
115
|
+
ci_runner.run
|
116
|
+
|
117
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\brandom=true\b/)
|
118
|
+
end
|
119
|
+
|
120
|
+
it 'allows randomization to be turned off, overriding the config' do
|
121
|
+
allow(config).to receive(:random) { true }
|
122
|
+
|
123
|
+
ci_runner = Jasmine::CiRunner.new(config, random: false, thread: fake_thread, application_factory: application_factory, server_factory: server_factory, outputter: outputter)
|
124
|
+
|
125
|
+
ci_runner.run
|
126
|
+
|
127
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\brandom=false\b/)
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'allows a randomization seed to be specified' do
|
131
|
+
ci_runner = Jasmine::CiRunner.new(config, seed: '4231', thread: fake_thread, application_factory: application_factory, server_factory: server_factory, outputter: outputter)
|
132
|
+
|
133
|
+
ci_runner.run
|
134
|
+
|
135
|
+
expect(runner_factory).to have_received(:call).with(instance_of(Jasmine::Formatters::Multi), /\bseed=4231\b/)
|
96
136
|
end
|
97
137
|
end
|
data/spec/jasmine_pojs_spec.rb
CHANGED
@@ -40,6 +40,7 @@ describe "POJS jasmine install" do
|
|
40
40
|
it "should successfully run rake jasmine:ci" do
|
41
41
|
output = `rake jasmine:ci`
|
42
42
|
output.should =~ (/[1-9]\d* specs, 0 failures/)
|
43
|
+
output.should_not =~ /Randomized with seed/
|
43
44
|
end
|
44
45
|
|
45
46
|
it "should raise an error when jasmine.yml cannot be found" do
|
@@ -85,6 +86,7 @@ describe "POJS jasmine install" do
|
|
85
86
|
FileUtils.cp(File.join(@root, 'spec', 'fixture', 'phantomConfig.js'), File.join('spec', 'javascripts', 'support'))
|
86
87
|
viewport_yaml = custom_jasmine_config('viewport') do |jasmine_config|
|
87
88
|
jasmine_config['phantom_config_script'] = 'spec/javascripts/support/phantomConfig.js'
|
89
|
+
jasmine_config['show_console_log'] = true
|
88
90
|
end
|
89
91
|
|
90
92
|
output = `rake jasmine:ci JASMINE_CONFIG_PATH=#{viewport_yaml}`
|
@@ -94,6 +96,7 @@ describe "POJS jasmine install" do
|
|
94
96
|
it 'should throw a useful error when the phantom customization fails' do
|
95
97
|
bad_phantom_yaml = custom_jasmine_config('viewport') do |jasmine_config|
|
96
98
|
jasmine_config['phantom_config_script'] = 'spec/javascripts/support/doesNotExist.js'
|
99
|
+
jasmine_config['show_console_log'] = true
|
97
100
|
end
|
98
101
|
|
99
102
|
output = `rake jasmine:ci JASMINE_CONFIG_PATH=#{bad_phantom_yaml}`
|
@@ -108,4 +111,14 @@ describe "POJS jasmine install" do
|
|
108
111
|
$?.should_not be_success
|
109
112
|
output.should =~ /afterAll go boom/
|
110
113
|
end
|
114
|
+
|
115
|
+
it 'should tell jasmine to randomize the execution order' do
|
116
|
+
randomized_yaml = custom_jasmine_config('random') do |jasmine_config|
|
117
|
+
jasmine_config['random'] = true
|
118
|
+
end
|
119
|
+
|
120
|
+
output = `rake jasmine:ci JASMINE_CONFIG_PATH=#{randomized_yaml}`
|
121
|
+
$?.should be_success
|
122
|
+
output.should =~ /Randomized with seed/
|
123
|
+
end
|
111
124
|
end
|
@@ -9,6 +9,7 @@ describe Jasmine::Formatters::Console do
|
|
9
9
|
o.stub(:puts) { |str| outputter_output << "#{str}\n" }
|
10
10
|
end
|
11
11
|
end
|
12
|
+
let(:run_details) { { 'order' => { 'random' => false } } }
|
12
13
|
|
13
14
|
describe '#format' do
|
14
15
|
it 'prints a dot for a successful spec' do
|
@@ -45,7 +46,7 @@ describe Jasmine::Formatters::Console do
|
|
45
46
|
results = [failing_result, failing_result]
|
46
47
|
formatter = Jasmine::Formatters::Console.new(outputter)
|
47
48
|
formatter.format(results)
|
48
|
-
formatter.done
|
49
|
+
formatter.done(run_details)
|
49
50
|
outputter_output.should match(/a suite with a failing spec/)
|
50
51
|
outputter_output.should match(/a failure message/)
|
51
52
|
outputter_output.should match(/a stack trace/)
|
@@ -56,7 +57,7 @@ describe Jasmine::Formatters::Console do
|
|
56
57
|
results = [passing_result]
|
57
58
|
console = Jasmine::Formatters::Console.new(outputter)
|
58
59
|
console.format(results)
|
59
|
-
console.done
|
60
|
+
console.done(run_details)
|
60
61
|
|
61
62
|
outputter_output.should match(/1 spec/)
|
62
63
|
outputter_output.should match(/0 failures/)
|
@@ -66,7 +67,7 @@ describe Jasmine::Formatters::Console do
|
|
66
67
|
results = [passing_result, passing_result]
|
67
68
|
console = Jasmine::Formatters::Console.new(outputter)
|
68
69
|
console.format(results)
|
69
|
-
console.done
|
70
|
+
console.done(run_details)
|
70
71
|
|
71
72
|
outputter_output.should match(/2 specs/)
|
72
73
|
outputter_output.should match(/0 failures/)
|
@@ -78,7 +79,7 @@ describe Jasmine::Formatters::Console do
|
|
78
79
|
results = [passing_result, failing_result]
|
79
80
|
console = Jasmine::Formatters::Console.new(outputter)
|
80
81
|
console.format(results)
|
81
|
-
console.done
|
82
|
+
console.done(run_details)
|
82
83
|
|
83
84
|
outputter_output.should match(/2 specs/)
|
84
85
|
outputter_output.should match(/1 failure/)
|
@@ -88,7 +89,7 @@ describe Jasmine::Formatters::Console do
|
|
88
89
|
results = [failing_result, failing_result]
|
89
90
|
console = Jasmine::Formatters::Console.new(outputter)
|
90
91
|
console.format(results)
|
91
|
-
console.done
|
92
|
+
console.done(run_details)
|
92
93
|
|
93
94
|
outputter_output.should match(/2 specs/)
|
94
95
|
outputter_output.should match(/2 failures/)
|
@@ -98,7 +99,7 @@ describe Jasmine::Formatters::Console do
|
|
98
99
|
results = [failing_result]
|
99
100
|
console = Jasmine::Formatters::Console.new(outputter)
|
100
101
|
console.format(results)
|
101
|
-
console.done
|
102
|
+
console.done(run_details)
|
102
103
|
|
103
104
|
outputter_output.should match(/a failure message/)
|
104
105
|
end
|
@@ -109,7 +110,7 @@ describe Jasmine::Formatters::Console do
|
|
109
110
|
results = [passing_result, pending_result]
|
110
111
|
console = Jasmine::Formatters::Console.new(outputter)
|
111
112
|
console.format(results)
|
112
|
-
console.done
|
113
|
+
console.done(run_details)
|
113
114
|
|
114
115
|
outputter_output.should match(/1 pending spec/)
|
115
116
|
end
|
@@ -118,7 +119,7 @@ describe Jasmine::Formatters::Console do
|
|
118
119
|
results = [pending_result, pending_result]
|
119
120
|
console = Jasmine::Formatters::Console.new(outputter)
|
120
121
|
console.format(results)
|
121
|
-
console.done
|
122
|
+
console.done(run_details)
|
122
123
|
|
123
124
|
outputter_output.should match(/2 pending specs/)
|
124
125
|
end
|
@@ -127,7 +128,7 @@ describe Jasmine::Formatters::Console do
|
|
127
128
|
results = [pending_result]
|
128
129
|
console = Jasmine::Formatters::Console.new(outputter)
|
129
130
|
console.format(results)
|
130
|
-
console.done
|
131
|
+
console.done(run_details)
|
131
132
|
|
132
133
|
outputter_output.should match(/I pend because/)
|
133
134
|
end
|
@@ -136,7 +137,7 @@ describe Jasmine::Formatters::Console do
|
|
136
137
|
results = [Jasmine::Result.new(pending_raw_result.merge('pendingReason' => ''))]
|
137
138
|
console = Jasmine::Formatters::Console.new(outputter)
|
138
139
|
console.format(results)
|
139
|
-
console.done
|
140
|
+
console.done(run_details)
|
140
141
|
|
141
142
|
outputter_output.should match(/No reason given/)
|
142
143
|
end
|
@@ -148,11 +149,22 @@ describe Jasmine::Formatters::Console do
|
|
148
149
|
results = [passing_result]
|
149
150
|
console = Jasmine::Formatters::Console.new(outputter)
|
150
151
|
console.format(results)
|
151
|
-
console.done
|
152
|
+
console.done(run_details)
|
152
153
|
|
153
154
|
outputter_output.should_not match(/pending spec[s]/)
|
154
155
|
end
|
155
156
|
end
|
157
|
+
|
158
|
+
describe 'when the tests were randomized' do
|
159
|
+
it 'should print a message with the seed' do
|
160
|
+
results = [passing_result]
|
161
|
+
console = Jasmine::Formatters::Console.new(outputter)
|
162
|
+
console.format(results)
|
163
|
+
console.done({ 'order' => { 'random' => true, 'seed' => '4325' } })
|
164
|
+
|
165
|
+
outputter_output.should match(/Randomized with seed 4325/)
|
166
|
+
end
|
167
|
+
end
|
156
168
|
end
|
157
169
|
|
158
170
|
def failing_result
|
@@ -18,8 +18,10 @@ describe Jasmine::Formatters::Multi do
|
|
18
18
|
formatter2.should_receive(:format).with(results2)
|
19
19
|
multi.format(results2)
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
run_details = double(:run_details)
|
22
|
+
|
23
|
+
formatter1.should_receive(:done).with(run_details)
|
24
|
+
formatter2.should_receive(:done).with(run_details)
|
25
|
+
multi.done(run_details)
|
24
26
|
end
|
25
27
|
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.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajan Agaskar
|
@@ -10,132 +10,132 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '4'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '4'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rack-test
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: multi_json
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: rspec
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: 2.5.0
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: 2.5.0
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: nokogiri
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: jasmine-core
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- - ~>
|
89
|
+
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: '2.
|
91
|
+
version: '2.4'
|
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.
|
98
|
+
version: '2.4'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: rack
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: 1.2.1
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 1.2.1
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rake
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: phantomjs
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
|
-
- -
|
138
|
+
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
description: Test your JavaScript without any framework dependencies, in any environment,
|
@@ -146,9 +146,9 @@ executables:
|
|
146
146
|
extensions: []
|
147
147
|
extra_rdoc_files: []
|
148
148
|
files:
|
149
|
-
- .gitignore
|
150
|
-
- .rspec
|
151
|
-
- .travis.yml
|
149
|
+
- ".gitignore"
|
150
|
+
- ".rspec"
|
151
|
+
- ".travis.yml"
|
152
152
|
- Gemfile
|
153
153
|
- HOW_TO_TEST.markdown
|
154
154
|
- MIT.LICENSE
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- release_notes/v2.2.0.md
|
211
211
|
- release_notes/v2.3.0.md
|
212
212
|
- release_notes/v2.3.1.md
|
213
|
+
- release_notes/v2.4.0.md
|
213
214
|
- spec/application_integration_spec.rb
|
214
215
|
- spec/application_spec.rb
|
215
216
|
- spec/base_spec.rb
|
@@ -247,22 +248,22 @@ licenses:
|
|
247
248
|
metadata: {}
|
248
249
|
post_install_message:
|
249
250
|
rdoc_options:
|
250
|
-
- --charset=UTF-8
|
251
|
+
- "--charset=UTF-8"
|
251
252
|
require_paths:
|
252
253
|
- lib
|
253
254
|
required_ruby_version: !ruby/object:Gem::Requirement
|
254
255
|
requirements:
|
255
|
-
- -
|
256
|
+
- - ">="
|
256
257
|
- !ruby/object:Gem::Version
|
257
258
|
version: '0'
|
258
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
259
260
|
requirements:
|
260
|
-
- -
|
261
|
+
- - ">="
|
261
262
|
- !ruby/object:Gem::Version
|
262
263
|
version: '0'
|
263
264
|
requirements: []
|
264
265
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.
|
266
|
+
rubygems_version: 2.4.5.1
|
266
267
|
signing_key:
|
267
268
|
specification_version: 4
|
268
269
|
summary: JavaScript BDD framework
|