specify 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specify/rspec/documentation_formatter.rb +8 -3
- data/lib/specify/rspec/example_group.rb +4 -4
- data/lib/specify/spec.rb +1 -5
- data/lib/specify/version.rb +1 -1
- data/lib/specify.rb +2 -0
- data/spec/nested_spec.rb +16 -11
- data/spec/steps_spec.rb +8 -14
- data/spec/top_level_spec.rb +0 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e58629e939ed681ae888123d14a2bdd72bfbd44a
|
4
|
+
data.tar.gz: 78f2bd0245507f970439284efee20cbba2631114
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 233afb80d963bf6cb4dfaeeba04ee0b52a77e0a49429098250a00c65d84098c233a01d1b0c42bacf487bf89203261a373d25ca8e65107a46f24adbcf58d6ccbd
|
7
|
+
data.tar.gz: ffb0902dfc6b52f0c26adec18e1e400bac2a321b72a34c4d0b56ad45bcc7d12760099f79e87a350aac2c9655edbcf3fb0d2c22d05f192b880d495222bae79c04
|
@@ -19,7 +19,7 @@ module RSpec
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def example_step_passed(notification)
|
22
|
-
no_keyword_display = %w(specify example it)
|
22
|
+
no_keyword_display = %w(specify example it rule)
|
23
23
|
keyword = notification.type.to_s
|
24
24
|
|
25
25
|
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
|
@@ -29,7 +29,7 @@ module RSpec
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def example_step_failed(notification)
|
32
|
-
no_keyword_display = %w(specify example it)
|
32
|
+
no_keyword_display = %w(specify example it rule)
|
33
33
|
keyword = notification.type.to_s
|
34
34
|
|
35
35
|
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message} (FAILED)" unless no_keyword_display.include?(keyword)
|
@@ -39,7 +39,12 @@ module RSpec
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def example_step_pending(notification)
|
42
|
-
|
42
|
+
no_keyword_display = %w(specify example it rule)
|
43
|
+
keyword = notification.type.to_s
|
44
|
+
#full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}"
|
45
|
+
|
46
|
+
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
|
47
|
+
full_message = "#{current_indentation} #{notification.message}" if no_keyword_display.include?(keyword)
|
43
48
|
|
44
49
|
if notification.options[:pending] && notification.options[:pending] != true
|
45
50
|
full_message << " (PENDING: #{notification.options[:pending]})"
|
@@ -36,10 +36,6 @@ module RSpec
|
|
36
36
|
Action :but, message, options, &block
|
37
37
|
end
|
38
38
|
|
39
|
-
def _(message, options = {}, &block)
|
40
|
-
Action :_, message, options, &block
|
41
|
-
end
|
42
|
-
|
43
39
|
def it(message, options = {}, &block)
|
44
40
|
Action :it, message, options, &block
|
45
41
|
end
|
@@ -52,6 +48,10 @@ module RSpec
|
|
52
48
|
Action :example, message, options, &block
|
53
49
|
end
|
54
50
|
|
51
|
+
def rule(message, options = {}, &block)
|
52
|
+
Action :rule, message, options, &block
|
53
|
+
end
|
54
|
+
|
55
55
|
private
|
56
56
|
|
57
57
|
def Action(type, message, options = {}, &block)
|
data/lib/specify/spec.rb
CHANGED
@@ -8,7 +8,7 @@ module Specify
|
|
8
8
|
alias :Feature :context
|
9
9
|
alias :Ability :context
|
10
10
|
alias :Story :context
|
11
|
-
alias :
|
11
|
+
alias :Component :context
|
12
12
|
alias :rules :context
|
13
13
|
alias :steps :context
|
14
14
|
alias :tests :context
|
@@ -33,10 +33,6 @@ def self.Component(*args, &block)
|
|
33
33
|
describe(*args, &block)
|
34
34
|
end
|
35
35
|
|
36
|
-
def self.Rule(*args, &block)
|
37
|
-
describe(*args, &block)
|
38
|
-
end
|
39
|
-
|
40
36
|
def self.rules(*args, &block)
|
41
37
|
describe(*args, &block)
|
42
38
|
end
|
data/lib/specify/version.rb
CHANGED
data/lib/specify.rb
CHANGED
@@ -32,8 +32,10 @@ end
|
|
32
32
|
|
33
33
|
RSpec::Core::ExampleGroup.define_example_method :Scenario, with_steps: true
|
34
34
|
RSpec::Core::ExampleGroup.define_example_method :Condition, with_steps: true
|
35
|
+
RSpec::Core::ExampleGroup.define_example_method :Behavior, with_steps: true
|
35
36
|
RSpec::Core::ExampleGroup.define_example_method :Step, with_steps: true
|
36
37
|
RSpec::Core::ExampleGroup.define_example_method :Test, with_steps: true
|
38
|
+
RSpec::Core::ExampleGroup.define_example_method :Rule, with_steps: true
|
37
39
|
|
38
40
|
require 'specify/rspec/shared_steps'
|
39
41
|
include RSpec::Specify::SharedSteps
|
data/spec/nested_spec.rb
CHANGED
@@ -21,19 +21,24 @@ end
|
|
21
21
|
Story 'top-level story block' do
|
22
22
|
Feature 'nested feature block' do
|
23
23
|
Ability 'nested ability block' do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
expect(@result).to eq('gets a result')
|
29
|
-
end
|
24
|
+
Scenario 'nested scenario block' do
|
25
|
+
specify 'specify some condition' do
|
26
|
+
@result = 'gets a result'
|
27
|
+
expect(@result).to eq('gets a result')
|
30
28
|
end
|
29
|
+
end
|
30
|
+
|
31
|
+
Condition 'nested condition block' do
|
32
|
+
specify 'specify some condition' do
|
33
|
+
@result = 'gets a result'
|
34
|
+
expect(@result).to eq('gets a result')
|
35
|
+
end
|
36
|
+
end
|
31
37
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
38
|
+
Behavior 'nested behavior block' do
|
39
|
+
specify 'specify some condition' do
|
40
|
+
@result = 'gets a result'
|
41
|
+
expect(@result).to eq('gets a result')
|
37
42
|
end
|
38
43
|
end
|
39
44
|
end
|
data/spec/steps_spec.rb
CHANGED
@@ -38,6 +38,14 @@ Feature' feature' do
|
|
38
38
|
expect(@but).to eq('but')
|
39
39
|
end
|
40
40
|
|
41
|
+
Rule 'rule' do
|
42
|
+
rule 'rule' do
|
43
|
+
@rule = 'rule'
|
44
|
+
end
|
45
|
+
|
46
|
+
expect(@rule).to eq('rule')
|
47
|
+
end
|
48
|
+
|
41
49
|
Step 'step' do
|
42
50
|
it 'it' do
|
43
51
|
@it = 'it'
|
@@ -56,21 +64,7 @@ Feature' feature' do
|
|
56
64
|
expect(@example).to eq('example')
|
57
65
|
end
|
58
66
|
|
59
|
-
Test 'test' do
|
60
|
-
_ 'generic' do
|
61
|
-
@generic = 'generic'
|
62
|
-
end
|
63
|
-
|
64
|
-
expect(@generic).to eq('generic')
|
65
|
-
end
|
66
|
-
|
67
67
|
Condition 'failing steps' do
|
68
|
-
expect {
|
69
|
-
_ 'expectation alerts failure' do
|
70
|
-
expect(2 + 2).to eq 5
|
71
|
-
end
|
72
|
-
}.to raise_error
|
73
|
-
|
74
68
|
expect {
|
75
69
|
specify 'expectation alerts failure' do
|
76
70
|
expect(2 + 2).to eq 5
|
data/spec/top_level_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Nyman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,7 +102,7 @@ licenses:
|
|
102
102
|
- MIT
|
103
103
|
metadata: {}
|
104
104
|
post_install_message: "\n(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n
|
105
|
-
\ Specify 0.
|
105
|
+
\ Specify 0.8.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
|
106
106
|
(::) (::) (::)\n "
|
107
107
|
rdoc_options: []
|
108
108
|
require_paths:
|