specify 0.10.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +46 -26
- data/.hound.yml +38 -55
- data/.rspec +3 -0
- data/.rubocop.yml +4 -0
- data/.travis.yml +7 -11
- data/CODE_OF_CONDUCT.md +68 -7
- data/Gemfile +5 -1
- data/LICENSE.md +21 -0
- data/README.md +153 -27
- data/Rakefile +11 -7
- data/bin/console +3 -6
- data/bin/setup +4 -1
- data/lib/specify.rb +36 -47
- data/lib/specify/rspec/example_group.rb +47 -40
- data/lib/specify/rspec/formatter.rb +72 -0
- data/lib/specify/rspec/notification.rb +0 -3
- data/lib/specify/rspec/reporter.rb +8 -15
- data/lib/specify/rspec/shared_steps.rb +1 -3
- data/lib/specify/rspec/world.rb +0 -3
- data/lib/specify/spec.rb +23 -17
- data/lib/specify/version.rb +1 -1
- data/specify.gemspec +26 -33
- metadata +46 -22
- data/LICENSE.txt +0 -22
- data/lib/specify/rspec/documentation_formatter.rb +0 -70
data/lib/specify/version.rb
CHANGED
data/specify.gemspec
CHANGED
@@ -1,43 +1,36 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path(
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require "specify/version"
|
5
|
+
require "date"
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = "specify"
|
8
9
|
spec.version = Specify::VERSION
|
9
|
-
spec.
|
10
|
-
spec.
|
11
|
-
spec.
|
12
|
-
spec.description = %q{
|
13
|
-
Specify is a test framework that is designed to treat testing as a
|
14
|
-
design activity by allowing requirements to be defined as tests.
|
15
|
-
Those tests can then be executed via an automation layer. This is
|
16
|
-
the basis of creating executable specifications.
|
17
|
-
}
|
18
|
-
spec.homepage = 'https://github.com/jnyman/specify'
|
19
|
-
spec.license = 'MIT'
|
20
|
-
|
21
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
-
spec.bindir = 'exe'
|
23
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = ['lib']
|
10
|
+
spec.date = Date.today.strftime("%Y-%m-%d")
|
11
|
+
spec.authors = ["Jeff Nyman"]
|
12
|
+
spec.email = ["jeffnyman@gmail.com"]
|
25
13
|
|
26
|
-
spec.
|
27
|
-
spec.
|
14
|
+
spec.summary = %q{Test and Data Condition DSL for RSpec}
|
15
|
+
spec.description = %q{Test and Data Condition DSL for RSpec}
|
16
|
+
spec.homepage = "https://github.com/jeffnyman/specify"
|
17
|
+
spec.license = "MIT"
|
28
18
|
|
29
|
-
spec.
|
30
|
-
|
31
|
-
|
32
|
-
spec.add_development_dependency 'pry'
|
33
|
-
spec.add_development_dependency 'simplecov'
|
34
|
-
spec.add_development_dependency 'rubocop'
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
35
22
|
|
36
|
-
spec.
|
37
|
-
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ["lib"]
|
38
26
|
|
39
|
-
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
28
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
29
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
30
|
+
spec.add_development_dependency "simplecov"
|
31
|
+
spec.add_development_dependency "rubocop"
|
32
|
+
spec.add_development_dependency "pry"
|
40
33
|
|
41
|
-
|
42
|
-
|
34
|
+
spec.add_runtime_dependency "rspec-core"
|
35
|
+
spec.add_runtime_dependency "coderay"
|
43
36
|
end
|
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: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Nyman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.17'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.17'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,6 +40,20 @@ dependencies:
|
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -53,7 +67,7 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: rubocop
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -67,7 +81,7 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: pry
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - ">="
|
@@ -81,23 +95,34 @@ dependencies:
|
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: rspec-core
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
|
-
type: :
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coderay
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: '0'
|
97
|
-
description:
|
98
|
-
as a\n design activity by allowing requirements to be defined as tests.\n Those
|
99
|
-
tests can then be executed via an automation layer. This is\n the basis of creating
|
100
|
-
executable specifications.\n "
|
125
|
+
description: Test and Data Condition DSL for RSpec
|
101
126
|
email:
|
102
127
|
- jeffnyman@gmail.com
|
103
128
|
executables: []
|
@@ -106,18 +131,19 @@ extra_rdoc_files: []
|
|
106
131
|
files:
|
107
132
|
- ".gitignore"
|
108
133
|
- ".hound.yml"
|
134
|
+
- ".rspec"
|
109
135
|
- ".rubocop.yml"
|
110
136
|
- ".travis.yml"
|
111
137
|
- CODE_OF_CONDUCT.md
|
112
138
|
- Gemfile
|
113
|
-
- LICENSE.
|
139
|
+
- LICENSE.md
|
114
140
|
- README.md
|
115
141
|
- Rakefile
|
116
142
|
- bin/console
|
117
143
|
- bin/setup
|
118
144
|
- lib/specify.rb
|
119
|
-
- lib/specify/rspec/documentation_formatter.rb
|
120
145
|
- lib/specify/rspec/example_group.rb
|
146
|
+
- lib/specify/rspec/formatter.rb
|
121
147
|
- lib/specify/rspec/notification.rb
|
122
148
|
- lib/specify/rspec/reporter.rb
|
123
149
|
- lib/specify/rspec/shared_steps.rb
|
@@ -125,13 +151,11 @@ files:
|
|
125
151
|
- lib/specify/spec.rb
|
126
152
|
- lib/specify/version.rb
|
127
153
|
- specify.gemspec
|
128
|
-
homepage: https://github.com/
|
154
|
+
homepage: https://github.com/jeffnyman/specify
|
129
155
|
licenses:
|
130
156
|
- MIT
|
131
157
|
metadata: {}
|
132
|
-
post_install_message:
|
133
|
-
\ Specify 0.10.2 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::)
|
134
|
-
(::) (::) (::) (::)\n "
|
158
|
+
post_install_message:
|
135
159
|
rdoc_options: []
|
136
160
|
require_paths:
|
137
161
|
- lib
|
@@ -139,16 +163,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
163
|
requirements:
|
140
164
|
- - ">="
|
141
165
|
- !ruby/object:Gem::Version
|
142
|
-
version: '
|
166
|
+
version: '0'
|
143
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
168
|
requirements:
|
145
169
|
- - ">="
|
146
170
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
171
|
+
version: '0'
|
148
172
|
requirements: []
|
149
173
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.7.6
|
151
175
|
signing_key:
|
152
176
|
specification_version: 4
|
153
|
-
summary:
|
177
|
+
summary: Test and Data Condition DSL for RSpec
|
154
178
|
test_files: []
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014-2016 Jeff Nyman
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,70 +0,0 @@
|
|
1
|
-
module RSpec
|
2
|
-
module Specify
|
3
|
-
module DocumentationFormatter
|
4
|
-
def self.included(base)
|
5
|
-
base.class_eval do
|
6
|
-
include InstanceMethods
|
7
|
-
|
8
|
-
alias :example_started_without_steps :example_started
|
9
|
-
alias :example_started :example_started_with_steps
|
10
|
-
|
11
|
-
alias :example_passed_without_steps :example_passed
|
12
|
-
alias :example_passed :example_passed_with_steps
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
module InstanceMethods
|
18
|
-
def example_started(notification)
|
19
|
-
end
|
20
|
-
|
21
|
-
def example_step_passed(notification)
|
22
|
-
no_keyword_display = %w(specify example it rule fact step test)
|
23
|
-
keyword = notification.type.to_s
|
24
|
-
|
25
|
-
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
|
26
|
-
full_message = "#{current_indentation} #{notification.message}" if no_keyword_display.include?(keyword)
|
27
|
-
|
28
|
-
output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :success)
|
29
|
-
end
|
30
|
-
|
31
|
-
def example_step_failed(notification)
|
32
|
-
no_keyword_display = %w(specify example it rule fact step test)
|
33
|
-
keyword = notification.type.to_s
|
34
|
-
|
35
|
-
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message} (FAILED)" unless no_keyword_display.include?(keyword)
|
36
|
-
full_message = "#{current_indentation} #{notification.message} (FAILED)" if no_keyword_display.include?(keyword)
|
37
|
-
|
38
|
-
output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :failure)
|
39
|
-
end
|
40
|
-
|
41
|
-
def example_step_pending(notification)
|
42
|
-
no_keyword_display = %w(specify example it rule fact step test)
|
43
|
-
keyword = notification.type.to_s
|
44
|
-
|
45
|
-
full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
|
46
|
-
full_message = "#{current_indentation} #{notification.message}" if no_keyword_display.include?(keyword)
|
47
|
-
|
48
|
-
if notification.options[:pending] && notification.options[:pending] != true
|
49
|
-
full_message << " (PENDING: #{notification.options[:pending]})"
|
50
|
-
else
|
51
|
-
full_message << ' (PENDING)'
|
52
|
-
end
|
53
|
-
|
54
|
-
output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :pending)
|
55
|
-
end
|
56
|
-
|
57
|
-
def example_started_with_steps(notification)
|
58
|
-
example_started_without_steps(notification)
|
59
|
-
|
60
|
-
return unless notification.example.metadata[:with_steps]
|
61
|
-
full_message = "#{current_indentation}#{notification.example.description}"
|
62
|
-
output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :default)
|
63
|
-
end
|
64
|
-
|
65
|
-
def example_passed_with_steps(notification)
|
66
|
-
example_passed_without_steps(notification) unless notification.example.metadata[:with_steps]
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|