specify 0.10.0 → 0.10.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.
data/spec/pending_spec.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- Ability 'Handle Pending Status' do
4
- Scenario 'pending steps' do
5
- Given 'context'
6
- When 'action'
7
- Then 'observable'
8
-
9
- Given 'step without block and tag', pending: true
10
- Given 'step without block and message', pending: 'wip'
11
- end
12
- end
@@ -1,92 +0,0 @@
1
- require 'spec_helper'
2
-
3
- shared_steps 'push steps' do
4
- Given 'empty pipe' do
5
- pipe.clear
6
- end
7
-
8
- When 'push data' do
9
- pipe.push 'testing'
10
- end
11
-
12
- Then 'pipe should have data' do
13
- expect(pipe.items).to eq(['testing'])
14
- end
15
- end
16
-
17
- shared_steps 'push with argument steps' do |value|
18
- When 'push data' do
19
- pipe.push value
20
- end
21
- end
22
-
23
- shared_steps 'pull steps' do
24
- When 'pull data' do
25
- pipe.pull
26
- end
27
-
28
- Then 'pipe should be empty' do
29
- expect(pipe.items).to eq([])
30
- end
31
- end
32
-
33
- Story 'duplicate shared steps' do
34
- it 'will raise an error' do
35
- expect {
36
- shared_steps 'duplicate' do
37
- end
38
-
39
- shared_steps 'duplicate' do
40
- end
41
- }.to raise_error
42
- end
43
- end
44
-
45
- Feature 'shared steps' do
46
- let(:pipe) do
47
- Class.new do
48
- def initialize
49
- @values = []
50
- end
51
-
52
- def items
53
- @values
54
- end
55
-
56
- def clear
57
- @values = []
58
- end
59
-
60
- def push(value)
61
- @values << value
62
- end
63
-
64
- def pull
65
- @values.shift
66
- end
67
- end.new
68
- end
69
-
70
- Scenario 'push and pull steps' do
71
- include_steps 'push steps'
72
- include_steps 'pull steps'
73
- end
74
-
75
- Scenario 'push, count and pull' do
76
- include_steps 'push steps'
77
-
78
- Then 'pipe should have one item' do
79
- expect(pipe.items.size).to eq(1)
80
- end
81
-
82
- include_steps 'pull steps'
83
- end
84
-
85
- Scenario 'push with arguments and pull' do
86
- include_steps 'push with argument steps', 'specify'
87
-
88
- expect(pipe.items).to eq(['specify'])
89
-
90
- include_steps 'pull steps'
91
- end
92
- end
data/spec/spec_helper.rb DELETED
@@ -1,18 +0,0 @@
1
- require 'simplecov'
2
- require 'coveralls'
3
-
4
- Coveralls.wear!
5
-
6
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
- SimpleCov::Formatter::HTMLFormatter,
8
- Coveralls::SimpleCov::Formatter
9
- ]
10
-
11
- SimpleCov.start do
12
- add_filter '/spec/'
13
- coverage_dir "#{SimpleCov.root}/spec/reports/coverage"
14
- minimum_coverage 90
15
- maximum_coverage_drop 5
16
- end
17
-
18
- require 'specify'
data/spec/steps_spec.rb DELETED
@@ -1,83 +0,0 @@
1
- require 'spec_helper'
2
-
3
- Feature' feature' do
4
- Ability 'ability' do
5
- Scenario 'scenario' do
6
- Given 'context' do
7
- @given = 'given'
8
- end
9
-
10
- When 'action' do
11
- @when = 'when'
12
- end
13
-
14
- Then 'result' do
15
- @then = 'then'
16
- end
17
-
18
- expect(@given).to eq('given')
19
- expect(@when).to eq('when')
20
- expect(@then).to eq('then')
21
- end
22
-
23
- Condition 'condition' do
24
- When 'action' do
25
- @when = 'when'
26
- end
27
-
28
- And 'action' do
29
- @and = 'and'
30
- end
31
-
32
- But 'but' do
33
- @but = 'but'
34
- end
35
-
36
- expect(@when).to eq('when')
37
- expect(@and).to eq('and')
38
- expect(@but).to eq('but')
39
- end
40
-
41
- Fact 'fact' do
42
- fact 'fact' do
43
- @fact = 'fact'
44
- end
45
-
46
- expect(@fact).to eq('fact')
47
- end
48
-
49
- Rule 'rule' do
50
- rule 'rule' do
51
- @rule = 'rule'
52
- end
53
-
54
- expect(@rule).to eq('rule')
55
- end
56
-
57
- Step 'step' do
58
- it 'it' do
59
- @it = 'it'
60
- end
61
-
62
- specify 'specify' do
63
- @specify = 'specify'
64
- end
65
-
66
- example 'example' do
67
- @example = 'example'
68
- end
69
-
70
- expect(@it).to eq('it')
71
- expect(@specify).to eq('specify')
72
- expect(@example).to eq('example')
73
- end
74
-
75
- Condition 'failing steps' do
76
- expect {
77
- specify 'expectation alerts failure' do
78
- expect(2 + 2).to eq 5
79
- end
80
- }.to raise_error
81
- end
82
- end
83
- end
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
-
3
- Feature 'top-level feature block' do
4
- end
5
-
6
- Ability 'top-level ability block' do
7
- end
8
-
9
- Story 'top-level story block' do
10
- end
11
-
12
- Component 'top-level component block' do
13
- end
14
-
15
- Workflow 'top-level workflow block' do
16
- end