jasmine 2.6.0 → 2.7.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 +2 -12
- data/lib/jasmine/base.rb +1 -1
- data/lib/jasmine/config.rb +4 -5
- data/lib/jasmine/configuration.rb +5 -3
- data/lib/jasmine/dependencies.rb +0 -4
- data/lib/jasmine/ruby_versions.rb +11 -0
- data/lib/jasmine/server.rb +3 -9
- data/lib/jasmine/version.rb +1 -1
- data/release_notes/v2.6.1.md +11 -0
- data/release_notes/v2.7.0.md +28 -0
- data/spec/application_integration_spec.rb +3 -3
- data/spec/application_spec.rb +16 -16
- data/spec/base_spec.rb +13 -11
- data/spec/configuration_spec.rb +29 -27
- data/spec/jasmine_command_line_tool_spec.rb +34 -34
- data/spec/jasmine_pojs_spec.rb +22 -22
- data/spec/jasmine_rails_spec.rb +30 -26
- data/spec/lib/jasmine/formatters/console_spec.rb +20 -20
- data/spec/lib/jasmine/formatters/multi_spec.rb +6 -6
- data/spec/page_spec.rb +2 -2
- data/spec/path_expander_spec.rb +6 -6
- data/spec/path_mapper_spec.rb +10 -10
- data/spec/performance/phantom_js_runner_performance_spec.rb +1 -1
- data/spec/rack/jasmine/runner_spec.rb +2 -2
- data/spec/result_spec.rb +8 -8
- data/spec/server_spec.rb +13 -49
- data/spec/yaml_config_parser_spec.rb +21 -21
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52deb510769314254a492ff4249de9f05611b556
|
4
|
+
data.tar.gz: aea92ab6a204385dfde29409543117dcb4ab4c2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 726c7614bbdafc676f410db7b663688829d397b710b2ddfffbe0be4ffb76ab5cdfd91564245fc2a2cb4e16abcd8e6fcae016fb93716023d94daa31801f0f0b6d
|
7
|
+
data.tar.gz: 9a21eae3801cc9b3cc648db60a088b9d27417b7d889ce76ff11bdda5dd2a97ba4c60fb4de3157e3990588907ff278556f7127f5591a6a09b0427a65d5284c423
|
data/jasmine.gemspec
CHANGED
@@ -1,17 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
3
|
require "jasmine/version"
|
4
|
-
|
5
|
-
def ruby_version_less_than(target_version)
|
6
|
-
version_parts = RUBY_VERSION.split('.').map(&:to_i).zip(target_version)
|
7
|
-
|
8
|
-
version_parts.each do |(current_part, target_part)|
|
9
|
-
if current_part < target_part
|
10
|
-
return true
|
11
|
-
end
|
12
|
-
end
|
13
|
-
false
|
14
|
-
end
|
4
|
+
require "jasmine/ruby_versions"
|
15
5
|
|
16
6
|
Gem::Specification.new do |s|
|
17
7
|
s.name = %q{jasmine}
|
@@ -51,7 +41,7 @@ Gem::Specification.new do |s|
|
|
51
41
|
s.add_development_dependency 'nokogiri'
|
52
42
|
end
|
53
43
|
|
54
|
-
s.add_dependency 'jasmine-core', '>= 2.
|
44
|
+
s.add_dependency 'jasmine-core', '>= 2.7.0', '< 3.0.0'
|
55
45
|
s.add_dependency 'rack', '>= 1.2.1'
|
56
46
|
s.add_dependency 'rake'
|
57
47
|
s.add_dependency 'phantomjs'
|
data/lib/jasmine/base.rb
CHANGED
@@ -23,7 +23,7 @@ module Jasmine
|
|
23
23
|
require 'socket'
|
24
24
|
begin
|
25
25
|
socket = TCPSocket.open(hostname, port)
|
26
|
-
rescue Errno::ECONNREFUSED, Errno::ENETUNREACH, Errno::EAFNOSUPPORT
|
26
|
+
rescue Errno::ECONNREFUSED, Errno::ENETUNREACH, Errno::EAFNOSUPPORT, Errno::EADDRNOTAVAIL, Errno::EHOSTUNREACH
|
27
27
|
return false
|
28
28
|
end
|
29
29
|
socket.close
|
data/lib/jasmine/config.rb
CHANGED
@@ -108,9 +108,8 @@ module Jasmine
|
|
108
108
|
config.css_files = lambda { yaml_config.css_files }
|
109
109
|
|
110
110
|
config.spec_dir = yaml_config.spec_dir
|
111
|
-
config.helper_files = yaml_config.helpers
|
112
|
-
config.spec_files =
|
113
|
-
config.testing_files = lambda { config.helper_files + config.spec_files }
|
111
|
+
config.helper_files = lambda { yaml_config.helpers }
|
112
|
+
config.spec_files = lambda { yaml_config.spec_files }
|
114
113
|
|
115
114
|
config.show_console_log = yaml_config.show_console_log
|
116
115
|
config.stop_spec_on_expectation_failure = yaml_config.stop_spec_on_expectation_failure
|
@@ -127,8 +126,8 @@ module Jasmine
|
|
127
126
|
|
128
127
|
def self.load_spec(spec_path)
|
129
128
|
return if spec_path.nil?
|
130
|
-
Jasmine.configure do |c|
|
131
|
-
c.spec_files = [spec_path]
|
129
|
+
Jasmine.configure do |c|
|
130
|
+
c.spec_files = lambda { [spec_path] }
|
132
131
|
end
|
133
132
|
end
|
134
133
|
end
|
@@ -2,8 +2,8 @@ module Jasmine
|
|
2
2
|
class Configuration
|
3
3
|
attr_writer :jasmine_css_files, :css_files
|
4
4
|
attr_writer :jasmine_files, :boot_files, :src_files, :runner_boot_files
|
5
|
-
attr_accessor :helper_files, :spec_files
|
6
|
-
attr_accessor :jasmine_path, :spec_path, :boot_path, :src_path, :image_path, :runner_boot_path
|
5
|
+
attr_accessor :helper_files, :spec_files
|
6
|
+
attr_accessor :jasmine_path, :spec_path, :boot_path, :src_path, :image_path, :runner_boot_path
|
7
7
|
attr_accessor :jasmine_dir, :spec_dir, :boot_dir, :src_dir, :images_dir, :runner_boot_dir
|
8
8
|
attr_accessor :formatters
|
9
9
|
attr_accessor :host
|
@@ -28,7 +28,9 @@ module Jasmine
|
|
28
28
|
@boot_files = lambda { [] }
|
29
29
|
@runner_boot_files = lambda { [] }
|
30
30
|
@src_files = lambda { [] }
|
31
|
-
@
|
31
|
+
@helper_files = lambda { [] }
|
32
|
+
@spec_files = lambda { [] }
|
33
|
+
@testing_files = lambda { helper_files.call + spec_files.call}
|
32
34
|
@runner = lambda { |config| }
|
33
35
|
@rack_options = {}
|
34
36
|
@show_console_log = false
|
data/lib/jasmine/dependencies.rb
CHANGED
@@ -18,10 +18,6 @@ module Jasmine
|
|
18
18
|
defined?(Rails) && Rails.respond_to?(:version)
|
19
19
|
end
|
20
20
|
|
21
|
-
def legacy_rack?
|
22
|
-
!defined?(Rack::Server)
|
23
|
-
end
|
24
|
-
|
25
21
|
def use_asset_pipeline?
|
26
22
|
assets_pipeline_available = (rails3? || rails4? || rails5?) && Rails.respond_to?(:application) && Rails.application.respond_to?(:assets)
|
27
23
|
rails3_assets_enabled = rails3? && assets_pipeline_available && Rails.application.config.assets.enabled != false
|
data/lib/jasmine/server.rb
CHANGED
@@ -9,15 +9,9 @@ module Jasmine
|
|
9
9
|
|
10
10
|
def start
|
11
11
|
@env['PORT'] = @port.to_s
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
else
|
16
|
-
server = Rack::Server.new(@rack_options.merge(:Port => @port, :AccessLog => []))
|
17
|
-
# workaround for Rack bug, when Rack > 1.2.1 is released Rack::Server.start(:app => Jasmine.app(self)) will work
|
18
|
-
server.instance_variable_set(:@app, @application)
|
19
|
-
server.start
|
20
|
-
end
|
12
|
+
Rack::Server.start(@rack_options.merge(:Port => @port,
|
13
|
+
:AccessLog => [],
|
14
|
+
:app => @application))
|
21
15
|
end
|
22
16
|
end
|
23
17
|
end
|
data/lib/jasmine/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Jasmine Gem 2.6.1 Release Notes
|
2
|
+
|
3
|
+
## Pull Requests and Issues
|
4
|
+
|
5
|
+
* Remove old code for legacy rack and set up the Jasmine application through proper channels
|
6
|
+
- Fixes [#284](https://github.com/jasmine/jasmine-gem/issues/284)
|
7
|
+
|
8
|
+
|
9
|
+
------
|
10
|
+
|
11
|
+
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Jasmine Gem 2.7.0 Release Notes
|
2
|
+
|
3
|
+
## Summary
|
4
|
+
|
5
|
+
This release updates the jasmine-core dependency to 2.7.0. See the
|
6
|
+
[jasmine-core release notes](https://github.com/jasmine/jasmine/blob/master/release_notes/2.7.0.md)
|
7
|
+
for more information
|
8
|
+
|
9
|
+
## Changes
|
10
|
+
|
11
|
+
* Properly pick up new spec and helper files without having to restart
|
12
|
+
|
13
|
+
## Pull Requests and Issues
|
14
|
+
|
15
|
+
* catch Errno::EHOSTUNREACH while testing Jasmine#server_is_listening_on
|
16
|
+
- Merges [#288](https://github.com/jasmine/jasmine-gem/issues/288) from @doooby
|
17
|
+
|
18
|
+
* Catch error "Errno::EADDRNOTAVAIL", if check socket connection at cli mode
|
19
|
+
- Merges [#286](https://github.com/jasmine/jasmine-gem/issues/286) from @websi
|
20
|
+
- Fixes [#285](https://github.com/jasmine/jasmine-gem/issues/285)
|
21
|
+
|
22
|
+
* Remove old code for legacy rack and set up the Jasmine application through proper channels
|
23
|
+
- Fixes [#284](https://github.com/jasmine/jasmine-gem/issues/284)
|
24
|
+
|
25
|
+
|
26
|
+
------
|
27
|
+
|
28
|
+
_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
|
@@ -5,10 +5,10 @@ describe "Jasmine::Application" do
|
|
5
5
|
it "includes no-cache headers for specs" do
|
6
6
|
pending
|
7
7
|
get "/__spec__/example_spec.js"
|
8
|
-
last_response.headers.
|
9
|
-
last_response.headers["Cache-Control"].
|
8
|
+
expect(last_response.headers).to have_key("Cache-Control")
|
9
|
+
expect(last_response.headers["Cache-Control"]).to eq "max-age=0, private, must-revalidate"
|
10
10
|
last_response.headers['Pragma'].each do |key|
|
11
|
-
last_response.headers[key].
|
11
|
+
expect(last_response.headers[key]).to eq 'no-cache'
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
data/spec/application_spec.rb
CHANGED
@@ -11,20 +11,20 @@ describe 'Jasmine::Application' do
|
|
11
11
|
builder = double('Rack::Builder.new')
|
12
12
|
#Rack::Builder instance evals, so builder.run is invalid syntax,
|
13
13
|
#this is the only way to stub out the 'run' dsl it gives to the block.
|
14
|
-
Jasmine::Application.
|
15
|
-
Jasmine::Application.
|
14
|
+
allow(Jasmine::Application).to receive(:run).with(handler1).and_return(app1)
|
15
|
+
allow(Jasmine::Application).to receive(:run).with(handler2).and_return(app2)
|
16
16
|
|
17
|
-
builder.
|
17
|
+
expect(builder).to receive(:map).twice do |path, &app|
|
18
18
|
if path == '/foo'
|
19
|
-
app.call.
|
19
|
+
expect(app.call).to eq app1
|
20
20
|
elsif path == '/bar'
|
21
|
-
app.call.
|
21
|
+
expect(app.call).to eq app2
|
22
22
|
else
|
23
23
|
raise 'Unexpected path passed'
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
Jasmine::Application.app(config, builder).
|
27
|
+
expect(Jasmine::Application.app(config, builder)).to eq builder
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'should run rack apps provided by the config' do
|
@@ -40,16 +40,16 @@ describe 'Jasmine::Application' do
|
|
40
40
|
{ :app => app4, :args => [:bar] }
|
41
41
|
])
|
42
42
|
builder = double('Rack::Builder.new')
|
43
|
-
builder.
|
44
|
-
builder.
|
45
|
-
args.
|
46
|
-
arg_block.
|
43
|
+
expect(builder).to receive(:use).with(app1)
|
44
|
+
expect(builder).to receive(:use) do |*args, &arg_block|
|
45
|
+
expect(args).to eq [app2]
|
46
|
+
expect(arg_block).to eq block
|
47
47
|
end
|
48
|
-
builder.
|
49
|
-
args.
|
50
|
-
arg_block.
|
48
|
+
expect(builder).to receive(:use) do |*args, &arg_block|
|
49
|
+
expect(args).to eq [app3, :foo, :bar]
|
50
|
+
expect(arg_block).to eq block
|
51
51
|
end
|
52
|
-
builder.
|
53
|
-
Jasmine::Application.app(config, builder).
|
52
|
+
expect(builder).to receive(:use).with(app4, :bar)
|
53
|
+
expect(Jasmine::Application.app(config, builder)).to eq builder
|
54
54
|
end
|
55
|
-
end
|
55
|
+
end
|
data/spec/base_spec.rb
CHANGED
@@ -2,32 +2,34 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Jasmine do
|
4
4
|
it "should provide the root path" do
|
5
|
-
File.
|
6
|
-
File.
|
7
|
-
Jasmine.root.
|
5
|
+
allow(File).to receive(:dirname).and_return('lib/jasmine')
|
6
|
+
expect(File).to receive(:expand_path) { |path| path }
|
7
|
+
expect(Jasmine.root).to eq 'lib/jasmine'
|
8
8
|
end
|
9
|
+
|
9
10
|
it "should append passed file paths" do
|
10
|
-
File.
|
11
|
-
File.
|
12
|
-
Jasmine.root('subdir1', 'subdir2').
|
11
|
+
allow(File).to receive(:dirname).and_return('lib/jasmine')
|
12
|
+
expect(File).to receive(:expand_path) { |path| path }
|
13
|
+
expect(Jasmine.root('subdir1', 'subdir2')).to eq File.join('lib/jasmine', 'subdir1', 'subdir2')
|
13
14
|
end
|
15
|
+
|
14
16
|
describe '#load_spec' do
|
15
17
|
it 'assigns the spec to the spec path' do
|
16
18
|
Jasmine.load_spec("spec/test")
|
17
|
-
Jasmine.config.spec_files.
|
19
|
+
expect(Jasmine.config.spec_files.call).to eq [ "spec/test" ]
|
18
20
|
end
|
19
21
|
|
20
22
|
it 'does not assign a spec path if passed a nil' do
|
21
23
|
Jasmine.load_spec("spec/test")
|
22
24
|
Jasmine.load_spec(nil)
|
23
|
-
Jasmine.config.spec_files.
|
25
|
+
expect(Jasmine.config.spec_files.call).to eq [ "spec/test" ]
|
24
26
|
end
|
25
27
|
|
26
28
|
it 'does not override nonspec files' do
|
27
|
-
Jasmine.config.helper_files = ["aaa"]
|
29
|
+
Jasmine.config.helper_files = lambda { ["aaa"] }
|
28
30
|
Jasmine.load_spec("spec/test")
|
29
|
-
Jasmine.config.spec_files.
|
30
|
-
Jasmine.config.helper_files.
|
31
|
+
expect(Jasmine.config.spec_files.call).to eq [ "spec/test" ]
|
32
|
+
expect(Jasmine.config.helper_files.call).to eq ["aaa"]
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
data/spec/configuration_spec.rb
CHANGED
@@ -53,10 +53,10 @@ describe Jasmine::Configuration do
|
|
53
53
|
config.add_path_mapper(lambda { |c| test_mapper1.new(c) })
|
54
54
|
config.add_path_mapper(lambda { |c| test_mapper2.new(c) })
|
55
55
|
config.add_path_mapper(lambda { |c| test_mapper3.new(c) })
|
56
|
-
config.css_files.
|
56
|
+
expect(config.css_files).to eq []
|
57
57
|
config.jasmine_css_files = lambda { %w(jasmine_css) }
|
58
58
|
config.css_files = lambda { %w(css) }
|
59
|
-
config.css_files.
|
59
|
+
expect(config.css_files).to eq %w(mapped_jasmine/jasmine_css/jasmine mapped_src/css/src)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -66,14 +66,16 @@ describe Jasmine::Configuration do
|
|
66
66
|
config.add_path_mapper(lambda { |c| test_mapper1.new(c) })
|
67
67
|
config.add_path_mapper(lambda { |c| test_mapper2.new(c) })
|
68
68
|
config.add_path_mapper(lambda { |c| test_mapper3.new(c) })
|
69
|
-
config.js_files.
|
69
|
+
expect(config.js_files).to eq []
|
70
70
|
config.jasmine_files = lambda { %w(jasmine) }
|
71
71
|
config.src_files = lambda { %w(src) }
|
72
72
|
config.boot_files = lambda { %w(boot) }
|
73
|
-
config.
|
74
|
-
config.
|
73
|
+
config.spec_files = lambda { %w(spec) }
|
74
|
+
config.helper_files = lambda { %w(helper) }
|
75
|
+
expect(config.js_files).to eq %w(
|
75
76
|
mapped_jasmine/jasmine/jasmine
|
76
77
|
mapped_boot/boot/boot mapped_src/src/src
|
78
|
+
mapped_spec/helper/spec
|
77
79
|
mapped_spec/spec/spec)
|
78
80
|
end
|
79
81
|
end
|
@@ -84,8 +86,8 @@ describe Jasmine::Configuration do
|
|
84
86
|
result = double
|
85
87
|
config.add_rack_path('some/path', lambda { result })
|
86
88
|
map = config.rack_path_map
|
87
|
-
map['some/path'].
|
88
|
-
map['some/path'].call.
|
89
|
+
expect(map['some/path']).to be
|
90
|
+
expect(map['some/path'].call).to eq result
|
89
91
|
end
|
90
92
|
end
|
91
93
|
|
@@ -94,7 +96,7 @@ describe Jasmine::Configuration do
|
|
94
96
|
config = Jasmine::Configuration.new()
|
95
97
|
app = double
|
96
98
|
config.add_rack_app(app)
|
97
|
-
config.rack_apps.
|
99
|
+
expect(config.rack_apps).to eq [{ :app => app, :args => [], :block => nil }]
|
98
100
|
end
|
99
101
|
|
100
102
|
it 'permits the addition of arbitary rack apps with a config block' do
|
@@ -102,14 +104,14 @@ describe Jasmine::Configuration do
|
|
102
104
|
app = double
|
103
105
|
block = lambda { 'foo' }
|
104
106
|
config.add_rack_app(app, &block)
|
105
|
-
config.rack_apps.
|
107
|
+
expect(config.rack_apps).to eq [{ :app => app, :args => [], :block => block }]
|
106
108
|
end
|
107
109
|
|
108
110
|
it 'permits the addition of arbitary rack apps with arbitrary config' do
|
109
111
|
config = Jasmine::Configuration.new()
|
110
112
|
app = double
|
111
113
|
config.add_rack_app(app, { :foo => 'bar' })
|
112
|
-
config.rack_apps.
|
114
|
+
expect(config.rack_apps).to eq [{ :app => app, :args => [{ :foo => 'bar' }], :block => nil }]
|
113
115
|
end
|
114
116
|
|
115
117
|
it 'permits the addition of arbitary rack apps with arbitrary config and a config block' do
|
@@ -117,19 +119,19 @@ describe Jasmine::Configuration do
|
|
117
119
|
app = double
|
118
120
|
block = lambda { 'foo' }
|
119
121
|
config.add_rack_app(app, { :foo => 'bar' }, &block)
|
120
|
-
config.rack_apps.
|
122
|
+
expect(config.rack_apps).to eq [{ :app => app, :args => [{ :foo => 'bar' }], :block => block }]
|
121
123
|
end
|
122
124
|
end
|
123
125
|
|
124
126
|
describe 'host' do
|
125
127
|
it 'should default to localhost' do
|
126
|
-
Jasmine::Configuration.new().host.
|
128
|
+
expect(Jasmine::Configuration.new().host).to eq 'http://localhost'
|
127
129
|
end
|
128
130
|
|
129
131
|
it 'returns host if set' do
|
130
132
|
config = Jasmine::Configuration.new()
|
131
133
|
config.host = 'foo'
|
132
|
-
config.host.
|
134
|
+
expect(config.host).to eq 'foo'
|
133
135
|
end
|
134
136
|
end
|
135
137
|
|
@@ -137,7 +139,7 @@ describe Jasmine::Configuration do
|
|
137
139
|
it 'returns value if set' do
|
138
140
|
config = Jasmine::Configuration.new()
|
139
141
|
config.spec_format = 'fish'
|
140
|
-
config.spec_format.
|
142
|
+
expect(config.spec_format).to eq 'fish'
|
141
143
|
end
|
142
144
|
end
|
143
145
|
|
@@ -145,7 +147,7 @@ describe Jasmine::Configuration do
|
|
145
147
|
it 'returns value if set' do
|
146
148
|
config = Jasmine::Configuration.new()
|
147
149
|
config.prevent_phantom_js_auto_install = true
|
148
|
-
config.prevent_phantom_js_auto_install.
|
150
|
+
expect(config.prevent_phantom_js_auto_install).to eq true
|
149
151
|
end
|
150
152
|
end
|
151
153
|
|
@@ -153,36 +155,36 @@ describe Jasmine::Configuration do
|
|
153
155
|
it 'returns value if set' do
|
154
156
|
config = Jasmine::Configuration.new()
|
155
157
|
config.show_full_stack_trace = true
|
156
|
-
config.show_full_stack_trace.
|
158
|
+
expect(config.show_full_stack_trace).to eq true
|
157
159
|
end
|
158
160
|
end
|
159
161
|
|
160
162
|
describe 'jasmine ports' do
|
161
163
|
it 'returns new CI port and caches return value' do
|
162
164
|
config = Jasmine::Configuration.new()
|
163
|
-
Jasmine.
|
164
|
-
config.port(:ci).
|
165
|
-
Jasmine.
|
166
|
-
config.port(:ci).
|
165
|
+
allow(Jasmine).to receive(:find_unused_port).and_return('1234')
|
166
|
+
expect(config.port(:ci)).to eq '1234'
|
167
|
+
allow(Jasmine).to receive(:find_unused_port).and_return('4321')
|
168
|
+
expect(config.port(:ci)).to eq '1234'
|
167
169
|
end
|
168
170
|
|
169
171
|
it 'returns ci port if configured' do
|
170
172
|
config = Jasmine::Configuration.new()
|
171
173
|
config.ci_port = '5678'
|
172
|
-
Jasmine.
|
173
|
-
config.port(:ci).
|
174
|
+
allow(Jasmine).to receive(:find_unused_port).and_return('1234')
|
175
|
+
expect(config.port(:ci)).to eq '5678'
|
174
176
|
end
|
175
177
|
|
176
178
|
it 'returns configured server port' do
|
177
179
|
config = Jasmine::Configuration.new()
|
178
180
|
config.server_port = 'fish'
|
179
|
-
config.port(:server).
|
181
|
+
expect(config.port(:server)).to eq 'fish'
|
180
182
|
end
|
181
183
|
|
182
184
|
it 'returns default server port' do
|
183
185
|
config = Jasmine::Configuration.new()
|
184
186
|
|
185
|
-
config.port(:server).
|
187
|
+
expect(config.port(:server)).to eq 8888
|
186
188
|
end
|
187
189
|
end
|
188
190
|
|
@@ -190,13 +192,13 @@ describe Jasmine::Configuration do
|
|
190
192
|
it 'returns value if set' do
|
191
193
|
config = Jasmine::Configuration.new()
|
192
194
|
config.formatters = ['pants']
|
193
|
-
config.formatters.
|
195
|
+
expect(config.formatters).to eq ['pants']
|
194
196
|
end
|
195
197
|
|
196
198
|
it 'returns defaults' do
|
197
199
|
config = Jasmine::Configuration.new()
|
198
200
|
|
199
|
-
config.formatters.
|
201
|
+
expect(config.formatters).to eq [Jasmine::Formatters::Console]
|
200
202
|
end
|
201
203
|
end
|
202
204
|
|
@@ -205,7 +207,7 @@ describe Jasmine::Configuration do
|
|
205
207
|
config = Jasmine::Configuration.new
|
206
208
|
foo = double(:foo)
|
207
209
|
config.runner = foo
|
208
|
-
config.runner.
|
210
|
+
expect(config.runner).to eq foo
|
209
211
|
end
|
210
212
|
|
211
213
|
it 'does nothing by default' do
|