clean_test 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +4 -4
- data/clean_test.gemspec +2 -3
- data/lib/clean_test/any.rb +3 -3
- data/lib/clean_test/version.rb +1 -1
- metadata +54 -76
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 84de9f4d1bd3b84bae8715a0ab42204a17c670f80e639e6b4923ea73bebe0087
|
4
|
+
data.tar.gz: 92ab0da9c732fe6bcb8d9a4b9514f5db28167a82e7dc612e4ff87c0cfac380f8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a1d60745ac37fe8557e3dc96260e23633636f722b173ebd2523b2b0fe5b9c9a13d68141c6466d8db8cac7bebc00184b3f36fbfe360ea40a5298874a08efc1374
|
7
|
+
data.tar.gz: 3037dcfaf8d3bb40ba3579e7a426d27b5313c2edf2618d52f0f9928005357ab562f0025327cd766773d6cc5be1bb262905a9bcd6e96849e748a55aa292fb4100
|
data/README.rdoc
CHANGED
@@ -49,7 +49,7 @@ Or, with bundler:
|
|
49
49
|
require 'clean_test/test_case'
|
50
50
|
|
51
51
|
class CircleTest < Clean::Test::TestCase
|
52
|
-
test_that "area is computed correctly"
|
52
|
+
test_that "area is computed correctly" do
|
53
53
|
Given {
|
54
54
|
@circle = Circle.new(10,any_string)
|
55
55
|
}
|
@@ -59,9 +59,9 @@ Or, with bundler:
|
|
59
59
|
Then {
|
60
60
|
assert_equal 314,@area
|
61
61
|
}
|
62
|
-
|
62
|
+
end
|
63
63
|
|
64
|
-
test_that "to_s includes the name"
|
64
|
+
test_that "to_s includes the name" do
|
65
65
|
Given {
|
66
66
|
@name = "foo"
|
67
67
|
@circle = Circle.new(any_int,@name)
|
@@ -72,7 +72,7 @@ Or, with bundler:
|
|
72
72
|
Then {
|
73
73
|
assert_match /#{@name}/,@string
|
74
74
|
}
|
75
|
-
|
75
|
+
end
|
76
76
|
end
|
77
77
|
|
78
78
|
What's going on here?
|
data/clean_test.gemspec
CHANGED
@@ -12,13 +12,12 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = %q{Clean up your Test::Unit tests}
|
13
13
|
s.description = %q{You can easily make your plain Ruby Test::Unit test cases clean and clear with Given/When/Then, placeholder values, and textual descriptions without resorting to metaprogramming or complex frameworks. Use as much or as little as you like}
|
14
14
|
|
15
|
-
s.rubyforge_project = "clean_test"
|
16
|
-
|
17
15
|
s.files = `git ls-files`.split("\n")
|
18
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
18
|
s.require_paths = ["lib"]
|
21
|
-
s.add_dependency("faker")
|
19
|
+
s.add_dependency("faker", "~> 2.12.0")
|
20
|
+
s.add_dependency("test-unit")
|
22
21
|
s.add_development_dependency("rdoc")
|
23
22
|
s.add_development_dependency("sdoc")
|
24
23
|
s.add_development_dependency("rake")
|
data/lib/clean_test/any.rb
CHANGED
@@ -107,9 +107,9 @@ module Clean #:nodoc:
|
|
107
107
|
max_size = min_size + rand(min_size) + 1
|
108
108
|
end
|
109
109
|
|
110
|
-
string = Faker::Lorem.words(1).join(' ')
|
110
|
+
string = Faker::Lorem.words(number: 1).join(' ')
|
111
111
|
while string.length < min_size
|
112
|
-
string += Faker::Lorem.words(1).join(' ')
|
112
|
+
string += Faker::Lorem.words(number: 1).join(' ')
|
113
113
|
end
|
114
114
|
|
115
115
|
string[0..(max_size-1)]
|
@@ -147,7 +147,7 @@ module Clean #:nodoc:
|
|
147
147
|
max = min + 10
|
148
148
|
end
|
149
149
|
|
150
|
-
Faker::Lorem.words(rand(max - min) + min).join(' ')
|
150
|
+
Faker::Lorem.words(number: rand(max - min) + min).join(' ')
|
151
151
|
end
|
152
152
|
end
|
153
153
|
end
|
data/lib/clean_test/version.rb
CHANGED
metadata
CHANGED
@@ -1,94 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clean_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- David Copeland
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2020-06-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: faker
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.12.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.12.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: test-unit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
20
32
|
- !ruby/object:Gem::Version
|
21
33
|
version: '0'
|
22
34
|
type: :runtime
|
23
35
|
prerelease: false
|
24
36
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
37
|
requirements:
|
27
|
-
- -
|
38
|
+
- - ">="
|
28
39
|
- !ruby/object:Gem::Version
|
29
40
|
version: '0'
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: rdoc
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
|
-
- -
|
45
|
+
- - ">="
|
36
46
|
- !ruby/object:Gem::Version
|
37
47
|
version: '0'
|
38
48
|
type: :development
|
39
49
|
prerelease: false
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
51
|
requirements:
|
43
|
-
- -
|
52
|
+
- - ">="
|
44
53
|
- !ruby/object:Gem::Version
|
45
54
|
version: '0'
|
46
55
|
- !ruby/object:Gem::Dependency
|
47
56
|
name: sdoc
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
58
|
requirements:
|
51
|
-
- -
|
59
|
+
- - ">="
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - ">="
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
- !ruby/object:Gem::Dependency
|
63
70
|
name: rake
|
64
71
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
72
|
requirements:
|
67
|
-
- -
|
73
|
+
- - ">="
|
68
74
|
- !ruby/object:Gem::Version
|
69
75
|
version: '0'
|
70
76
|
type: :development
|
71
77
|
prerelease: false
|
72
78
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
79
|
requirements:
|
75
|
-
- -
|
80
|
+
- - ">="
|
76
81
|
- !ruby/object:Gem::Version
|
77
82
|
version: '0'
|
78
83
|
- !ruby/object:Gem::Dependency
|
79
84
|
name: simplecov
|
80
85
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
86
|
requirements:
|
83
|
-
- -
|
87
|
+
- - ">="
|
84
88
|
- !ruby/object:Gem::Version
|
85
89
|
version: '0'
|
86
90
|
type: :development
|
87
91
|
prerelease: false
|
88
92
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
93
|
requirements:
|
91
|
-
- -
|
94
|
+
- - ">="
|
92
95
|
- !ruby/object:Gem::Version
|
93
96
|
version: '0'
|
94
97
|
description: You can easily make your plain Ruby Test::Unit test cases clean and clear
|
@@ -100,74 +103,49 @@ executables: []
|
|
100
103
|
extensions: []
|
101
104
|
extra_rdoc_files: []
|
102
105
|
files:
|
103
|
-
-
|
104
|
-
|
105
|
-
-
|
106
|
-
|
107
|
-
-
|
108
|
-
|
109
|
-
-
|
110
|
-
|
111
|
-
-
|
112
|
-
|
113
|
-
-
|
114
|
-
|
115
|
-
-
|
116
|
-
|
117
|
-
-
|
118
|
-
|
119
|
-
-
|
120
|
-
|
121
|
-
- !binary |-
|
122
|
-
bGliL2NsZWFuX3Rlc3QvZ2l2ZW5fd2hlbl90aGVuLnJi
|
123
|
-
- !binary |-
|
124
|
-
bGliL2NsZWFuX3Rlc3QvdGVzdF9jYXNlLnJi
|
125
|
-
- !binary |-
|
126
|
-
bGliL2NsZWFuX3Rlc3QvdGVzdF90aGF0LnJi
|
127
|
-
- !binary |-
|
128
|
-
bGliL2NsZWFuX3Rlc3QvdmVyc2lvbi5yYg==
|
129
|
-
- !binary |-
|
130
|
-
dGVzdC9ib290c3RyYXAucmI=
|
131
|
-
- !binary |-
|
132
|
-
dGVzdC90ZXN0X2FueS5yYg==
|
133
|
-
- !binary |-
|
134
|
-
dGVzdC90ZXN0X2NpcmNsZS5yYg==
|
135
|
-
- !binary |-
|
136
|
-
dGVzdC90ZXN0X2dpdmVuX3doZW5fdGhlbi5yYg==
|
137
|
-
- !binary |-
|
138
|
-
dGVzdC90ZXN0X3Rlc3RfdGhhdC5yYg==
|
106
|
+
- ".gitignore"
|
107
|
+
- ".rvmrc"
|
108
|
+
- ".travis.yml"
|
109
|
+
- Gemfile
|
110
|
+
- LICENSE.txt
|
111
|
+
- README.rdoc
|
112
|
+
- Rakefile
|
113
|
+
- clean_test.gemspec
|
114
|
+
- lib/clean_test/any.rb
|
115
|
+
- lib/clean_test/given_when_then.rb
|
116
|
+
- lib/clean_test/test_case.rb
|
117
|
+
- lib/clean_test/test_that.rb
|
118
|
+
- lib/clean_test/version.rb
|
119
|
+
- test/bootstrap.rb
|
120
|
+
- test/test_any.rb
|
121
|
+
- test/test_circle.rb
|
122
|
+
- test/test_given_when_then.rb
|
123
|
+
- test/test_test_that.rb
|
139
124
|
homepage: ''
|
140
125
|
licenses: []
|
126
|
+
metadata: {}
|
141
127
|
post_install_message:
|
142
128
|
rdoc_options: []
|
143
129
|
require_paths:
|
144
130
|
- lib
|
145
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
132
|
requirements:
|
148
|
-
- -
|
133
|
+
- - ">="
|
149
134
|
- !ruby/object:Gem::Version
|
150
135
|
version: '0'
|
151
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
137
|
requirements:
|
154
|
-
- -
|
138
|
+
- - ">="
|
155
139
|
- !ruby/object:Gem::Version
|
156
140
|
version: '0'
|
157
141
|
requirements: []
|
158
|
-
|
159
|
-
rubygems_version: 1.8.24
|
142
|
+
rubygems_version: 3.1.2
|
160
143
|
signing_key:
|
161
|
-
specification_version:
|
144
|
+
specification_version: 4
|
162
145
|
summary: Clean up your Test::Unit tests
|
163
146
|
test_files:
|
164
|
-
-
|
165
|
-
|
166
|
-
-
|
167
|
-
|
168
|
-
-
|
169
|
-
dGVzdC90ZXN0X2NpcmNsZS5yYg==
|
170
|
-
- !binary |-
|
171
|
-
dGVzdC90ZXN0X2dpdmVuX3doZW5fdGhlbi5yYg==
|
172
|
-
- !binary |-
|
173
|
-
dGVzdC90ZXN0X3Rlc3RfdGhhdC5yYg==
|
147
|
+
- test/bootstrap.rb
|
148
|
+
- test/test_any.rb
|
149
|
+
- test/test_circle.rb
|
150
|
+
- test/test_given_when_then.rb
|
151
|
+
- test/test_test_that.rb
|