gurke 2.0.0.dev.1.b19 → 2.0.0.dev.1.b20
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 +8 -8
- data/spec/gurke/scenario_spec.rb +50 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2IyOGUyNzJiNTkzNTU2NzJmNjE0ZTMwZTVkOTI2ZTY1ZjMyMDE1YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWJhZmU4M2U4ODZmNDYxMDRlMWFhZjgzZDU4Y2NjMGFlNTNjYjgzYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Nzc2YzQ3OTlkYTAzNzk2MThlNjU1NGZhZWQ2NDM5ZDM0Y2I3YzM4ODFjODE2
|
10
|
+
MTRiYjk0NjQxNzY5Yzk1YWE5YjdjNjVlODFjZWI0MWQ5MmRmMzRmNGUxZjRk
|
11
|
+
NWYzN2FjMWMzZDg3NTk4NmQxODlmYjFjZTEyYmQxYjMxMzQzZjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjU1ZDI0NzlkM2FjZTllZjkzZjNiYjNkZmY2ZmFlNTQ0NTkwN2M4ZjJmYWY4
|
14
|
+
OTFiMWMzYTlhNTE0ZjY4YWQ4MGYwMmMzZGMwOWRlYWFmMWIyNWVjNTY5NjVj
|
15
|
+
ZThkNmQzMDMwYzEzYzFmMzQxNGU4MGZlMzkwYzZkYTlhNTEwMzE=
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Gurke::Scenario do
|
4
|
+
let(:reporter) { Gurke::Reporters::NullReporter.new }
|
5
|
+
let(:runner) { double 'runner' }
|
6
|
+
let(:feature) { double 'feature' }
|
7
|
+
let(:backgrounds) { double('backgrounds') }
|
8
|
+
|
9
|
+
before do
|
10
|
+
allow(feature).to receive(:backgrounds).ordered.and_return(backgrounds)
|
11
|
+
allow(backgrounds).to receive(:run)
|
12
|
+
allow(runner).to receive(:hook){|_,_,&block| block.call }
|
13
|
+
end
|
14
|
+
|
15
|
+
let(:scenario) do
|
16
|
+
Gurke::Scenario.new(feature, nil, nil, nil, nil)
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#run' do
|
20
|
+
subject { scenario.run(runner, reporter) }
|
21
|
+
|
22
|
+
it 'runs all backgrounds' do
|
23
|
+
expect(backgrounds).to receive(:run)
|
24
|
+
.with(runner, reporter, scenario, scenario.send(:world))
|
25
|
+
|
26
|
+
subject
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'runs hook in scenario world' do
|
30
|
+
expect(runner).to receive(:hook) do |scope, world|
|
31
|
+
expect(scope).to eq :scenario
|
32
|
+
expect(world).to eq scenario.send(:world)
|
33
|
+
end
|
34
|
+
|
35
|
+
subject
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'runs reporter callbacks in correct order' do
|
39
|
+
expect(reporter).to receive(:invoke).exactly(4).times do |*args|
|
40
|
+
@scopes ||= []
|
41
|
+
@scopes << args.first
|
42
|
+
end
|
43
|
+
|
44
|
+
subject
|
45
|
+
|
46
|
+
expect(@scopes).to eq [:before_scenario, :start_scenario,
|
47
|
+
:end_scenario, :after_scenario]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gurke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.dev.1.
|
4
|
+
version: 2.0.0.dev.1.b20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- lib/gurke/steps.rb
|
107
107
|
- lib/gurke/tag.rb
|
108
108
|
- lib/gurke/version.rb
|
109
|
+
- spec/gurke/scenario_spec.rb
|
109
110
|
- spec/spec_helper.rb
|
110
111
|
homepage: https://github.com/jgraichen/gurke
|
111
112
|
licenses:
|
@@ -139,4 +140,5 @@ test_files:
|
|
139
140
|
- features/gurke/step_specific_definitions.feature
|
140
141
|
- features/support/steps/cli_steps.rb
|
141
142
|
- features/support/steps/file_steps.rb
|
143
|
+
- spec/gurke/scenario_spec.rb
|
142
144
|
- spec/spec_helper.rb
|