specify 0.8.0 → 0.9.0
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 +4 -4
- data/lib/specify/rspec/documentation_formatter.rb +3 -4
- data/lib/specify/rspec/example_group.rb +12 -0
- data/lib/specify/spec.rb +3 -12
- data/lib/specify/version.rb +1 -1
- data/lib/specify.rb +7 -0
- data/spec/api_spec.rb +45 -0
- data/spec/steps_spec.rb +8 -0
- data/spec/top_level_spec.rb +2 -8
- data/specify.gemspec +2 -2
- metadata +9 -9
- data/spec/nested_spec.rb +0 -75
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbce3e763bb587ca4e22697758df1193f0c5390b
|
4
|
+
data.tar.gz: bacc2a768947097371695d3cd5f7917ddb80fe2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 519d2f32a0c395e75ab89c7b0afa047c568e144abd664d2bb995890236eca9c99a2fe40e6907f46a208239d48b88bb87adcc6302e21fd36bf09630da9096c971
|
7
|
+
data.tar.gz: a3de2b83e891d4c9a89f4d7e6082bf5097ec48be037b332a8463ead16238bdba3fb154585cf380bb384e67e7f780c98d5ed01de8ba3551ed866e5a8d51bab38f
|
@@ -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 rule)
|
22
|
+
no_keyword_display = %w(specify example it rule fact step test)
|
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 rule)
|
32
|
+
no_keyword_display = %w(specify example it rule fact step test)
|
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,9 +39,8 @@ module RSpec
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def example_step_pending(notification)
|
42
|
-
no_keyword_display = %w(specify example it rule)
|
42
|
+
no_keyword_display = %w(specify example it rule fact step test)
|
43
43
|
keyword = notification.type.to_s
|
44
|
-
#full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}"
|
45
44
|
|
46
45
|
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
|
47
46
|
full_message = "#{current_indentation} #{notification.message}" if no_keyword_display.include?(keyword)
|
@@ -52,6 +52,18 @@ module RSpec
|
|
52
52
|
Action :rule, message, options, &block
|
53
53
|
end
|
54
54
|
|
55
|
+
def fact(message, options = {}, &block)
|
56
|
+
Action :fact, message, options, &block
|
57
|
+
end
|
58
|
+
|
59
|
+
def test(message, options = {}, &block)
|
60
|
+
Action :test, message, options, &block
|
61
|
+
end
|
62
|
+
|
63
|
+
def step(message, options = {}, &block)
|
64
|
+
Action :step, message, options, &block
|
65
|
+
end
|
66
|
+
|
55
67
|
private
|
56
68
|
|
57
69
|
def Action(type, message, options = {}, &block)
|
data/lib/specify/spec.rb
CHANGED
@@ -5,13 +5,12 @@ module Specify
|
|
5
5
|
alias :Background :before
|
6
6
|
alias :Setup :before
|
7
7
|
alias :Teardown :after
|
8
|
+
|
8
9
|
alias :Feature :context
|
9
10
|
alias :Ability :context
|
10
11
|
alias :Story :context
|
11
12
|
alias :Component :context
|
12
|
-
alias :
|
13
|
-
alias :steps :context
|
14
|
-
alias :tests :context
|
13
|
+
alias :Workflow :context
|
15
14
|
end
|
16
15
|
end
|
17
16
|
end
|
@@ -33,15 +32,7 @@ def self.Component(*args, &block)
|
|
33
32
|
describe(*args, &block)
|
34
33
|
end
|
35
34
|
|
36
|
-
def self.
|
37
|
-
describe(*args, &block)
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.steps(*args, &block)
|
41
|
-
describe(*args, &block)
|
42
|
-
end
|
43
|
-
|
44
|
-
def self.tests(*args, &block)
|
35
|
+
def self.Workflow(*args, &block)
|
45
36
|
describe(*args, &block)
|
46
37
|
end
|
47
38
|
|
data/lib/specify/version.rb
CHANGED
data/lib/specify.rb
CHANGED
@@ -33,9 +33,16 @@ end
|
|
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
35
|
RSpec::Core::ExampleGroup.define_example_method :Behavior, with_steps: true
|
36
|
+
|
36
37
|
RSpec::Core::ExampleGroup.define_example_method :Step, with_steps: true
|
37
38
|
RSpec::Core::ExampleGroup.define_example_method :Test, with_steps: true
|
38
39
|
RSpec::Core::ExampleGroup.define_example_method :Rule, with_steps: true
|
40
|
+
RSpec::Core::ExampleGroup.define_example_method :Fact, with_steps: true
|
41
|
+
|
42
|
+
RSpec::Core::ExampleGroup.define_example_method :steps, with_steps: true
|
43
|
+
RSpec::Core::ExampleGroup.define_example_method :rules, with_steps: true
|
44
|
+
RSpec::Core::ExampleGroup.define_example_method :tests, with_steps: true
|
45
|
+
RSpec::Core::ExampleGroup.define_example_method :facts, with_steps: true
|
39
46
|
|
40
47
|
require 'specify/rspec/shared_steps'
|
41
48
|
include RSpec::Specify::SharedSteps
|
data/spec/api_spec.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
Component 'component block' do
|
4
|
+
steps 'steps block' do
|
5
|
+
step 'step block' do
|
6
|
+
@result = 'result'
|
7
|
+
expect(@result).to eq('result')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
Step 'step block' do
|
12
|
+
step 'step block' do
|
13
|
+
@result = 'result'
|
14
|
+
expect(@result).to eq('result')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
tests 'tests block' do
|
19
|
+
test 'test block' do
|
20
|
+
@result = 'result'
|
21
|
+
expect(@result).to eq('result')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Test 'test block' do
|
26
|
+
test 'test block' do
|
27
|
+
@result = 'result'
|
28
|
+
expect(@result).to eq('result')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
rules 'rules block' do
|
33
|
+
rule 'rule block' do
|
34
|
+
@result = 'result'
|
35
|
+
expect(@result).to eq('result')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
Rule 'rule block' do
|
40
|
+
rule 'rule block' do
|
41
|
+
@result = 'result'
|
42
|
+
expect(@result).to eq('result')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/spec/steps_spec.rb
CHANGED
data/spec/top_level_spec.rb
CHANGED
data/specify.gemspec
CHANGED
@@ -28,9 +28,9 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
30
30
|
spec.add_development_dependency 'rake', '~> 10.0'
|
31
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
31
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
32
32
|
|
33
|
-
spec.add_runtime_dependency 'rspec-core', '~> 3.
|
33
|
+
spec.add_runtime_dependency 'rspec-core', '~> 3.1'
|
34
34
|
|
35
35
|
spec.post_install_message = %{
|
36
36
|
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
|
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.9.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
|
+
date: 2014-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-core
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.1'
|
69
69
|
description: "\n Specify is a test framework that is designed to treat testing
|
70
70
|
as a\n design activity by allowing requirements to be defined as tests.\n Those
|
71
71
|
tests can then be executed via an automation layer. This is\n the basis of creating
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
- lib/specify/rspec/world.rb
|
91
91
|
- lib/specify/spec.rb
|
92
92
|
- lib/specify/version.rb
|
93
|
-
- spec/
|
93
|
+
- spec/api_spec.rb
|
94
94
|
- spec/pending_spec.rb
|
95
95
|
- spec/shared_steps_spec.rb
|
96
96
|
- spec/spec_helper.rb
|
@@ -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.9.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
|
106
106
|
(::) (::) (::)\n "
|
107
107
|
rdoc_options: []
|
108
108
|
require_paths:
|
@@ -124,7 +124,7 @@ signing_key:
|
|
124
124
|
specification_version: 4
|
125
125
|
summary: Description Language Specification and Execution Engine
|
126
126
|
test_files:
|
127
|
-
- spec/
|
127
|
+
- spec/api_spec.rb
|
128
128
|
- spec/pending_spec.rb
|
129
129
|
- spec/shared_steps_spec.rb
|
130
130
|
- spec/spec_helper.rb
|
data/spec/nested_spec.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
Feature 'top-level feature block' do
|
4
|
-
Ability 'secondary-level ability block' do
|
5
|
-
specify 'specify some condition' do
|
6
|
-
@result = 'gets a result'
|
7
|
-
expect(@result).to eq('gets a result')
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
Feature 'top-level feature block' do
|
13
|
-
Story 'nested story block' do
|
14
|
-
specify 'specify some condition' do
|
15
|
-
@result = 'gets a result'
|
16
|
-
expect(@result).to eq('gets a result')
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
Story 'top-level story block' do
|
22
|
-
Feature 'nested feature block' do
|
23
|
-
Ability 'nested ability block' do
|
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')
|
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
|
37
|
-
|
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')
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
Component 'top-level component block' do
|
49
|
-
rules 'nested rules block' do
|
50
|
-
Rule 'nested rule keyword' do
|
51
|
-
specify 'specify some condition' do
|
52
|
-
@result = 'gets a result'
|
53
|
-
expect(@result).to eq('gets a result')
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
steps 'nested steps block' do
|
59
|
-
Step 'nested step block' do
|
60
|
-
specify 'specify some condition' do
|
61
|
-
@result = 'gets a result'
|
62
|
-
expect(@result).to eq('gets a result')
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
tests 'nested tests block' do
|
68
|
-
Test 'nested test block' do
|
69
|
-
specify 'specify some condition' do
|
70
|
-
@result = 'gets a result'
|
71
|
-
expect(@result).to eq('gets a result')
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|