fix 0.5.0 → 0.6.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/VERSION.semver +1 -1
- data/fix.gemspec +2 -2
- data/lib/fix.rb +7 -6
- data/lib/fix/db.rb +9 -7
- data/lib/fix/dsl.rb +2 -2
- data/lib/fix/subject.rb +1 -1
- data/lib/fix/test.rb +49 -40
- data/spec/fix/bin/color_spec.rb +17 -0
- data/spec/fix/bin/exit_status_spec.rb +19 -0
- data/spec/fix/bin/help_spec.rb +12 -0
- data/spec/fix/bin/spec_helper.rb +3 -0
- data/spec/fix/bin/version_spec.rb +9 -0
- data/spec/fix/lib/may/error_spec.rb +9 -0
- data/spec/fix/lib/may/info_spec.rb +9 -0
- data/spec/fix/lib/may/spec_helper.rb +1 -0
- data/spec/fix/lib/may/success_spec.rb +9 -0
- data/spec/fix/lib/must/error_spec.rb +9 -0
- data/spec/fix/lib/must/failure_spec.rb +9 -0
- data/spec/fix/lib/must/spec_helper.rb +1 -0
- data/spec/fix/lib/must/success_spec.rb +9 -0
- data/spec/fix/lib/should/error_spec.rb +9 -0
- data/spec/fix/lib/should/info_spec.rb +9 -0
- data/spec/fix/lib/should/spec_helper.rb +1 -0
- data/spec/fix/lib/should/success_spec.rb +9 -0
- data/spec/fix/lib/spec_helper.rb +1 -0
- data/spec/fix/lib/success_spec.rb +9 -0
- data/spec/fix/spec_helper.rb +1 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/support/env.rb +1 -4
- data/spec/support/examples/42/app.rb +1 -0
- data/spec/support/examples/42/may/error/spec.rb +11 -0
- data/spec/support/examples/42/may/error/test.rb +7 -0
- data/spec/support/examples/42/may/info/spec.rb +11 -0
- data/spec/support/examples/42/may/info/test.rb +7 -0
- data/spec/support/examples/42/may/success/spec.rb +8 -0
- data/spec/support/examples/42/may/success/test.rb +7 -0
- data/spec/support/examples/42/must/error/spec.rb +7 -0
- data/spec/support/examples/42/must/error/test.rb +7 -0
- data/spec/support/examples/42/must/failure/spec.rb +7 -0
- data/spec/support/examples/42/must/failure/test.rb +7 -0
- data/spec/support/examples/42/must/success/spec.rb +7 -0
- data/spec/support/examples/42/must/success/test.rb +7 -0
- data/spec/support/examples/42/should/error/spec.rb +7 -0
- data/spec/support/examples/42/should/error/test.rb +7 -0
- data/spec/support/examples/42/should/info/spec.rb +7 -0
- data/spec/support/examples/42/should/info/test.rb +7 -0
- data/spec/support/examples/42/should/success/spec.rb +7 -0
- data/spec/support/examples/42/should/success/test.rb +7 -0
- data/{example/duck/lib.rb → spec/support/examples/duck/app.rb} +2 -0
- data/spec/support/examples/duck/success/spec.rb +33 -0
- data/spec/support/examples/duck/success/test.rb +7 -0
- metadata +88 -12
- metadata.gz.sig +0 -0
- data/example/duck/README.md +0 -8
- data/example/duck/app.rb +0 -3
- data/example/duck/test.rb +0 -36
- data/spec/TODO +0 -0
- data/spec/support/presenter.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a60b163dcfc45938625b447954255573f72bf830
|
4
|
+
data.tar.gz: 9fe9f4a65edadfd535d84431917a9214afa4a285
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 187e7ea75c9fc59c78c58109db558b70b1fb9c1344629f4735a04fe8fdcb2094a30b52daa73068ddaa96dd390eb6a9f0c687e64bfed80e118ce693718574ff5e
|
7
|
+
data.tar.gz: 9c7c0e1d345f02619aee188b52cce2a2ea22b078fc2c27da88c51a80c986f83fcd8885234cd00ea091031805ac5e7d8f81a1e8136ed8b8d2ade53b98c72f1ed6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/fix.gemspec
CHANGED
@@ -14,14 +14,14 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.require_paths = ['lib']
|
15
15
|
spec.required_ruby_version = '>= 2.0.0'
|
16
16
|
|
17
|
-
spec.add_dependency 'spectus', '~> 1.0.
|
17
|
+
spec.add_dependency 'spectus', '~> 1.0.1'
|
18
18
|
|
19
19
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
20
20
|
spec.add_development_dependency 'rake', '~> 10.0'
|
21
21
|
spec.add_development_dependency 'yard', '~> 0.8'
|
22
22
|
spec.add_development_dependency 'coveralls', '~> 0.7'
|
23
23
|
|
24
|
-
private_key = File.expand_path '
|
24
|
+
private_key = File.expand_path File.join('~', '.gemcert', 'fix-gem-private_key.pem')
|
25
25
|
if File.exist? private_key
|
26
26
|
spec.signing_key = private_key
|
27
27
|
spec.cert_chain = ['fix.pem']
|
data/lib/fix.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative File.join 'fix', 'dsl'
|
1
2
|
require_relative File.join 'fix', 'version'
|
2
3
|
|
3
4
|
require 'optparse'
|
@@ -36,26 +37,26 @@ module Fix
|
|
36
37
|
opts.separator ''
|
37
38
|
opts.separator 'Specific options:'
|
38
39
|
|
39
|
-
opts.on('
|
40
|
+
opts.on('--color', 'Enable color in the output.') do
|
40
41
|
options[:color] = (const_set :COLOR, true)
|
41
42
|
end
|
42
43
|
|
43
|
-
opts.on('
|
44
|
+
opts.on('--seed [INTEGER]', Integer, 'Order of the tests') do |seed|
|
44
45
|
options[:seed] = seed
|
45
46
|
end
|
46
47
|
|
47
|
-
opts.on('
|
48
|
+
opts.on('--debug', 'Enable ruby debug') do
|
48
49
|
options[:debug] = $DEBUG = true
|
49
50
|
end
|
50
51
|
|
51
|
-
opts.on('
|
52
|
+
opts.on('--warnings', 'Enable ruby warnings') do
|
52
53
|
options[:warnings] = $VERBOSE = true
|
53
54
|
end
|
54
55
|
|
55
56
|
opts.separator ''
|
56
57
|
opts.separator 'Common options:'
|
57
58
|
|
58
|
-
opts.on_tail '
|
59
|
+
opts.on_tail '--help', 'Show this message' do
|
59
60
|
puts opts
|
60
61
|
exit
|
61
62
|
end
|
@@ -75,7 +76,7 @@ module Fix
|
|
75
76
|
absolute_paths = Set.new
|
76
77
|
|
77
78
|
args.map do |s|
|
78
|
-
s = File.absolute_path s unless s.start_with?
|
79
|
+
s = File.absolute_path s unless s.start_with? File::SEPARATOR
|
79
80
|
|
80
81
|
if File.directory? s
|
81
82
|
spec_files = File.join s, '**', '*_spec.rb'
|
data/lib/fix/db.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
require 'singleton'
|
2
2
|
|
3
3
|
module Fix
|
4
|
-
|
4
|
+
unless defined? DB
|
5
|
+
random = Random.new(defined?(SEED) ? SEED : Random.new_seed)
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
db = Class.new Hash do
|
8
|
+
include Singleton
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
define_method :random do
|
11
|
+
random
|
12
|
+
end
|
11
13
|
end
|
12
|
-
end
|
13
14
|
|
14
|
-
|
15
|
+
const_set :DB, db
|
16
|
+
end
|
15
17
|
end
|
data/lib/fix/dsl.rb
CHANGED
data/lib/fix/subject.rb
CHANGED
data/lib/fix/test.rb
CHANGED
@@ -34,10 +34,12 @@ module Fix
|
|
34
34
|
end
|
35
35
|
|
36
36
|
@io.puts
|
37
|
-
@io.puts about "
|
37
|
+
@io.puts about "Ran #{@results.length} tests in #{@total_time} seconds"
|
38
38
|
@io.puts statistics
|
39
39
|
|
40
40
|
freeze
|
41
|
+
|
42
|
+
exit 1 if fail?
|
41
43
|
end
|
42
44
|
|
43
45
|
def errors
|
@@ -54,50 +56,50 @@ module Fix
|
|
54
56
|
|
55
57
|
def reports results_with_state
|
56
58
|
__send__(results_with_state).map do |result|
|
57
|
-
result.fetch(:object).inspect +
|
58
|
-
|
59
|
-
'.' +
|
60
|
-
result.fetch(:params).map.with_index do |args, i|
|
61
|
-
color = if i == result.fetch(:last_arg)
|
62
|
-
state result
|
63
|
-
elsif i > result.fetch(:last_arg)
|
64
|
-
:pending
|
65
|
-
else
|
66
|
-
:default
|
67
|
-
end
|
68
|
-
|
69
|
-
__send__(color, "#{args.first}" +
|
70
|
-
if args.length > 1
|
71
|
-
'(' + args[1..-1].map {|arg| arg.to_s }.join(',') + ')'
|
72
|
-
else
|
73
|
-
''
|
74
|
-
end
|
75
|
-
)
|
76
|
-
end.join('.')
|
77
|
-
else
|
78
|
-
''
|
79
|
-
end +
|
59
|
+
truncate(result.fetch(:object).inspect) +
|
60
|
+
if result.fetch(:params).any?
|
80
61
|
'.' +
|
81
|
-
(
|
82
|
-
color = if
|
62
|
+
result.fetch(:params).map.with_index do |args, i|
|
63
|
+
color = if i == result.fetch(:last_arg)
|
83
64
|
state result
|
84
|
-
|
65
|
+
elsif i > result.fetch(:last_arg)
|
85
66
|
:pending
|
67
|
+
else
|
68
|
+
:default
|
86
69
|
end
|
87
70
|
|
88
|
-
__send__(color, "#{
|
89
|
-
if
|
90
|
-
'(' +
|
71
|
+
__send__(color, "#{args.first}" +
|
72
|
+
if args.length > 1
|
73
|
+
'(' + args[1..-1].map {|arg| arg.to_s }.join(',') + ')'
|
91
74
|
else
|
92
75
|
''
|
93
76
|
end
|
94
77
|
)
|
95
|
-
)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
78
|
+
end.join('.')
|
79
|
+
else
|
80
|
+
''
|
81
|
+
end +
|
82
|
+
'.' +
|
83
|
+
(
|
84
|
+
color = if result.fetch(:params).length == result.fetch(:last_arg)
|
85
|
+
state result
|
86
|
+
else
|
87
|
+
:pending
|
88
|
+
end
|
89
|
+
|
90
|
+
__send__(color, "#{result.fetch(:challenge).first}" +
|
91
|
+
if result.fetch(:challenge).length > 1
|
92
|
+
'(' + result.fetch(:challenge)[1..-1].map {|arg| arg.inspect }.join(',') + ')'
|
93
|
+
else
|
94
|
+
''
|
95
|
+
end
|
96
|
+
)
|
97
|
+
) +
|
98
|
+
' ' +
|
99
|
+
expectation_level(result) +
|
100
|
+
' ' +
|
101
|
+
matcher_with_expected_if_given(result) +
|
102
|
+
returned_value(result)
|
101
103
|
end
|
102
104
|
end
|
103
105
|
|
@@ -110,14 +112,17 @@ module Fix
|
|
110
112
|
:success
|
111
113
|
end
|
112
114
|
|
113
|
-
percents =
|
115
|
+
percents = if @results.empty?
|
116
|
+
100
|
117
|
+
else
|
118
|
+
(@results.count {|result| result.fetch(:pass) != false }) / @results.length.to_f * 100
|
119
|
+
end
|
114
120
|
|
115
|
-
__send__ color, "#{percents.round}% compliant
|
116
|
-
"#{@results.length} specs",
|
121
|
+
__send__ color, "#{percents.round}% compliant - " + [
|
117
122
|
"#{infos.length} infos",
|
118
123
|
"#{failures.length} failures",
|
119
124
|
"#{errors.length} errors"
|
120
|
-
].join(', ')
|
125
|
+
].join(', ')
|
121
126
|
end
|
122
127
|
|
123
128
|
def pass?
|
@@ -130,6 +135,10 @@ module Fix
|
|
130
135
|
|
131
136
|
private
|
132
137
|
|
138
|
+
def truncate string
|
139
|
+
string.length > 16 ? string[0..16].concat('[...]') : string
|
140
|
+
end
|
141
|
+
|
133
142
|
def returned_value result
|
134
143
|
if result.fetch(:exception).nil?
|
135
144
|
about ' # => got ' + result.fetch(:got).inspect
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
subject Proc.new {
|
4
|
+
`#{BIN_PATH} #{Pathname.new(__FILE__).join '..', '..', '..', 'support', 'examples', 'duck', 'success', 'test.rb'}`
|
5
|
+
}
|
6
|
+
|
7
|
+
its :call do
|
8
|
+
MUST match: /^......$/
|
9
|
+
end
|
10
|
+
|
11
|
+
subject Proc.new {
|
12
|
+
`#{BIN_PATH} #{Pathname.new(__FILE__).join '..', '..', '..', 'support', 'examples', 'duck', 'success', 'test.rb'} --color`
|
13
|
+
}
|
14
|
+
|
15
|
+
its :call do
|
16
|
+
MUST match: /^#{Regexp.escape("\e[32m.\e[0m" * 6)}$/
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
subject Proc.new {
|
4
|
+
`#{BIN_PATH} #{Pathname.new(__FILE__).join '..', '..', '..', 'support', 'examples', '42', 'must', 'success', 'test.rb'}`
|
5
|
+
$?
|
6
|
+
}
|
7
|
+
|
8
|
+
on :call do
|
9
|
+
its(:exitstatus) { MUST equal: 0 }
|
10
|
+
end
|
11
|
+
|
12
|
+
subject Proc.new {
|
13
|
+
`#{BIN_PATH} #{Pathname.new(__FILE__).join '..', '..', '..', 'support', 'examples', '42', 'must', 'error', 'test.rb'}`
|
14
|
+
$?
|
15
|
+
}
|
16
|
+
|
17
|
+
on :call do
|
18
|
+
its(:exitstatus) { MUST equal: 1 }
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
subject Proc.new { `#{BIN_PATH} --help` }
|
4
|
+
|
5
|
+
its :call do
|
6
|
+
MUST match: /Usage: fix <files or directories> \[options\]/
|
7
|
+
MUST match: / --color /
|
8
|
+
MUST match: / --seed /
|
9
|
+
MUST match: / --debug /
|
10
|
+
MUST match: / --warnings /
|
11
|
+
MUST match: / --version /
|
12
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative File.join '..', 'spec_helper'
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative File.join '..', 'spec_helper'
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative File.join '..', 'spec_helper'
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative File.join '..', 'spec_helper'
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative File.join '..', 'spec_helper'
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/env.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
@app = 42
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@specs = ->(front_object) {
|
2
|
+
extend Fix::DSL
|
3
|
+
|
4
|
+
subject front_object
|
5
|
+
|
6
|
+
let(:word) { "Quaaa" }
|
7
|
+
|
8
|
+
on :swims do
|
9
|
+
it { MUST capture_stderr: " ...\n" }
|
10
|
+
end
|
11
|
+
|
12
|
+
on :quacks do
|
13
|
+
let(:quaaaaaack) { word + "aaack!\n" }
|
14
|
+
|
15
|
+
it { SHOULD capture_stdout: quaaaaaack }
|
16
|
+
end
|
17
|
+
|
18
|
+
its(:speaks) { MUST raise_exception: NoMethodError }
|
19
|
+
|
20
|
+
on :sings do
|
21
|
+
it { MAY eql: "♪... ♫..." }
|
22
|
+
end
|
23
|
+
|
24
|
+
on :walks do
|
25
|
+
let(:walks) { "#{word}... Klop klop!" }
|
26
|
+
|
27
|
+
it { MUST eql: walks }
|
28
|
+
|
29
|
+
on :split, '... ' do
|
30
|
+
its(:last) { MUST eql: "Klop klop!" }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Wack
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
sQCgS9KCAyZ+aWNO1bUJcE3Bx1XXkMO3JEyVR1CoEcexg5Ci03/lAm7lL84DmlKR
|
31
31
|
3I7UWtomapPFbzC0J/5jzQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-10-
|
33
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: spectus
|
@@ -38,14 +38,14 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.0.
|
41
|
+
version: 1.0.1
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.0.
|
48
|
+
version: 1.0.1
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: bundler
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,10 +119,6 @@ files:
|
|
119
119
|
- Rakefile
|
120
120
|
- VERSION.semver
|
121
121
|
- bin/fix
|
122
|
-
- example/duck/README.md
|
123
|
-
- example/duck/app.rb
|
124
|
-
- example/duck/lib.rb
|
125
|
-
- example/duck/test.rb
|
126
122
|
- fix.gemspec
|
127
123
|
- fix.pem
|
128
124
|
- lib/fix.rb
|
@@ -145,12 +141,52 @@ files:
|
|
145
141
|
- lib/fix/subject.rb
|
146
142
|
- lib/fix/test.rb
|
147
143
|
- lib/fix/version.rb
|
148
|
-
- spec/
|
144
|
+
- spec/fix/bin/color_spec.rb
|
145
|
+
- spec/fix/bin/exit_status_spec.rb
|
146
|
+
- spec/fix/bin/help_spec.rb
|
147
|
+
- spec/fix/bin/spec_helper.rb
|
148
|
+
- spec/fix/bin/version_spec.rb
|
149
|
+
- spec/fix/lib/may/error_spec.rb
|
150
|
+
- spec/fix/lib/may/info_spec.rb
|
151
|
+
- spec/fix/lib/may/spec_helper.rb
|
152
|
+
- spec/fix/lib/may/success_spec.rb
|
153
|
+
- spec/fix/lib/must/error_spec.rb
|
154
|
+
- spec/fix/lib/must/failure_spec.rb
|
155
|
+
- spec/fix/lib/must/spec_helper.rb
|
156
|
+
- spec/fix/lib/must/success_spec.rb
|
157
|
+
- spec/fix/lib/should/error_spec.rb
|
158
|
+
- spec/fix/lib/should/info_spec.rb
|
159
|
+
- spec/fix/lib/should/spec_helper.rb
|
160
|
+
- spec/fix/lib/should/success_spec.rb
|
161
|
+
- spec/fix/lib/spec_helper.rb
|
162
|
+
- spec/fix/lib/success_spec.rb
|
163
|
+
- spec/fix/spec_helper.rb
|
149
164
|
- spec/spec_helper.rb
|
150
165
|
- spec/support.rb
|
151
166
|
- spec/support/coverage.rb
|
152
167
|
- spec/support/env.rb
|
153
|
-
- spec/support/
|
168
|
+
- spec/support/examples/42/app.rb
|
169
|
+
- spec/support/examples/42/may/error/spec.rb
|
170
|
+
- spec/support/examples/42/may/error/test.rb
|
171
|
+
- spec/support/examples/42/may/info/spec.rb
|
172
|
+
- spec/support/examples/42/may/info/test.rb
|
173
|
+
- spec/support/examples/42/may/success/spec.rb
|
174
|
+
- spec/support/examples/42/may/success/test.rb
|
175
|
+
- spec/support/examples/42/must/error/spec.rb
|
176
|
+
- spec/support/examples/42/must/error/test.rb
|
177
|
+
- spec/support/examples/42/must/failure/spec.rb
|
178
|
+
- spec/support/examples/42/must/failure/test.rb
|
179
|
+
- spec/support/examples/42/must/success/spec.rb
|
180
|
+
- spec/support/examples/42/must/success/test.rb
|
181
|
+
- spec/support/examples/42/should/error/spec.rb
|
182
|
+
- spec/support/examples/42/should/error/test.rb
|
183
|
+
- spec/support/examples/42/should/info/spec.rb
|
184
|
+
- spec/support/examples/42/should/info/test.rb
|
185
|
+
- spec/support/examples/42/should/success/spec.rb
|
186
|
+
- spec/support/examples/42/should/success/test.rb
|
187
|
+
- spec/support/examples/duck/app.rb
|
188
|
+
- spec/support/examples/duck/success/spec.rb
|
189
|
+
- spec/support/examples/duck/success/test.rb
|
154
190
|
homepage: http://fixrb.org/
|
155
191
|
licenses:
|
156
192
|
- MIT
|
@@ -176,10 +212,50 @@ signing_key:
|
|
176
212
|
specification_version: 4
|
177
213
|
summary: Specing framework.
|
178
214
|
test_files:
|
179
|
-
- spec/
|
215
|
+
- spec/fix/bin/color_spec.rb
|
216
|
+
- spec/fix/bin/exit_status_spec.rb
|
217
|
+
- spec/fix/bin/help_spec.rb
|
218
|
+
- spec/fix/bin/spec_helper.rb
|
219
|
+
- spec/fix/bin/version_spec.rb
|
220
|
+
- spec/fix/lib/may/error_spec.rb
|
221
|
+
- spec/fix/lib/may/info_spec.rb
|
222
|
+
- spec/fix/lib/may/spec_helper.rb
|
223
|
+
- spec/fix/lib/may/success_spec.rb
|
224
|
+
- spec/fix/lib/must/error_spec.rb
|
225
|
+
- spec/fix/lib/must/failure_spec.rb
|
226
|
+
- spec/fix/lib/must/spec_helper.rb
|
227
|
+
- spec/fix/lib/must/success_spec.rb
|
228
|
+
- spec/fix/lib/should/error_spec.rb
|
229
|
+
- spec/fix/lib/should/info_spec.rb
|
230
|
+
- spec/fix/lib/should/spec_helper.rb
|
231
|
+
- spec/fix/lib/should/success_spec.rb
|
232
|
+
- spec/fix/lib/spec_helper.rb
|
233
|
+
- spec/fix/lib/success_spec.rb
|
234
|
+
- spec/fix/spec_helper.rb
|
180
235
|
- spec/spec_helper.rb
|
181
236
|
- spec/support.rb
|
182
237
|
- spec/support/coverage.rb
|
183
238
|
- spec/support/env.rb
|
184
|
-
- spec/support/
|
239
|
+
- spec/support/examples/42/app.rb
|
240
|
+
- spec/support/examples/42/may/error/spec.rb
|
241
|
+
- spec/support/examples/42/may/error/test.rb
|
242
|
+
- spec/support/examples/42/may/info/spec.rb
|
243
|
+
- spec/support/examples/42/may/info/test.rb
|
244
|
+
- spec/support/examples/42/may/success/spec.rb
|
245
|
+
- spec/support/examples/42/may/success/test.rb
|
246
|
+
- spec/support/examples/42/must/error/spec.rb
|
247
|
+
- spec/support/examples/42/must/error/test.rb
|
248
|
+
- spec/support/examples/42/must/failure/spec.rb
|
249
|
+
- spec/support/examples/42/must/failure/test.rb
|
250
|
+
- spec/support/examples/42/must/success/spec.rb
|
251
|
+
- spec/support/examples/42/must/success/test.rb
|
252
|
+
- spec/support/examples/42/should/error/spec.rb
|
253
|
+
- spec/support/examples/42/should/error/test.rb
|
254
|
+
- spec/support/examples/42/should/info/spec.rb
|
255
|
+
- spec/support/examples/42/should/info/test.rb
|
256
|
+
- spec/support/examples/42/should/success/spec.rb
|
257
|
+
- spec/support/examples/42/should/success/test.rb
|
258
|
+
- spec/support/examples/duck/app.rb
|
259
|
+
- spec/support/examples/duck/success/spec.rb
|
260
|
+
- spec/support/examples/duck/success/test.rb
|
185
261
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|
data/example/duck/README.md
DELETED
data/example/duck/app.rb
DELETED
data/example/duck/test.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby -w
|
2
|
-
|
3
|
-
require_relative 'app'
|
4
|
-
require_relative File.join '..', '..', 'lib', 'fix', 'dsl'
|
5
|
-
|
6
|
-
extend Fix::DSL
|
7
|
-
|
8
|
-
subject @app
|
9
|
-
|
10
|
-
let(:word) { "Quaaa" }
|
11
|
-
|
12
|
-
on :swims do
|
13
|
-
it { MUST capture_stderr: " ...\n" }
|
14
|
-
end
|
15
|
-
|
16
|
-
on :quacks do
|
17
|
-
let(:quaaaaaack) { word + "aaack!\n" }
|
18
|
-
|
19
|
-
it { SHOULD capture_stdout: quaaaaaack }
|
20
|
-
end
|
21
|
-
|
22
|
-
its(:speaks) { MUST raise_exception: NoMethodError }
|
23
|
-
|
24
|
-
on :sings do
|
25
|
-
it { MAY eql: "♪... ♫..." }
|
26
|
-
end
|
27
|
-
|
28
|
-
on :walks do
|
29
|
-
let(:walks) { "#{word}... Klop klop!" }
|
30
|
-
|
31
|
-
it { MUST eql: walks }
|
32
|
-
|
33
|
-
on :split, '... ' do
|
34
|
-
its(:last) { MUST eql: "Klop klop!" }
|
35
|
-
end
|
36
|
-
end
|
data/spec/TODO
DELETED
File without changes
|
data/spec/support/presenter.rb
DELETED
File without changes
|