simplecov 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -7
  2. data/.rspec +3 -1
  3. data/.rubocop.yml +6 -5
  4. data/CHANGELOG.md +16 -2
  5. data/Gemfile +14 -14
  6. data/README.md +28 -12
  7. data/Rakefile +5 -8
  8. data/features/config_formatters.feature +1 -1
  9. data/features/config_tracked_files.feature +29 -0
  10. data/features/step_definitions/transformers.rb +1 -1
  11. data/features/support/env.rb +6 -3
  12. data/lib/simplecov.rb +19 -2
  13. data/lib/simplecov/configuration.rb +24 -4
  14. data/lib/simplecov/defaults.rb +28 -5
  15. data/lib/simplecov/file_list.rb +11 -0
  16. data/lib/simplecov/filter.rb +1 -1
  17. data/lib/simplecov/formatter/multi_formatter.rb +17 -13
  18. data/lib/simplecov/result.rb +1 -1
  19. data/lib/simplecov/source_file.rb +6 -3
  20. data/lib/simplecov/version.rb +1 -1
  21. data/spec/1_8_fallbacks_spec.rb +29 -0
  22. data/spec/command_guesser_spec.rb +46 -0
  23. data/spec/deleted_source_spec.rb +12 -0
  24. data/{test → spec}/faked_project/Gemfile +0 -0
  25. data/{test → spec}/faked_project/Rakefile +0 -0
  26. data/{test → spec}/faked_project/cucumber.yml +0 -0
  27. data/{test → spec}/faked_project/features/step_definitions/my_steps.rb +0 -0
  28. data/{test → spec}/faked_project/features/support/env.rb +0 -0
  29. data/{test → spec}/faked_project/features/test_stuff.feature +0 -0
  30. data/{test → spec}/faked_project/lib/faked_project.rb +1 -1
  31. data/{test → spec}/faked_project/lib/faked_project/framework_specific.rb +0 -0
  32. data/{test → spec}/faked_project/lib/faked_project/meta_magic.rb +0 -0
  33. data/{test → spec}/faked_project/lib/faked_project/some_class.rb +0 -0
  34. data/spec/faked_project/lib/faked_project/untested_class.rb +11 -0
  35. data/{test → spec}/faked_project/spec/faked_spec.rb +0 -0
  36. data/{test → spec}/faked_project/spec/forking_spec.rb +0 -0
  37. data/{test → spec}/faked_project/spec/meta_magic_spec.rb +0 -0
  38. data/{test → spec}/faked_project/spec/some_class_spec.rb +0 -0
  39. data/{test → spec}/faked_project/spec/spec_helper.rb +0 -0
  40. data/{test → spec}/faked_project/test/faked_test.rb +0 -0
  41. data/{test → spec}/faked_project/test/meta_magic_test.rb +0 -0
  42. data/{test → spec}/faked_project/test/some_class_test.rb +0 -0
  43. data/{test → spec}/faked_project/test/test_helper.rb +0 -0
  44. data/spec/file_list_spec.rb +48 -0
  45. data/spec/filters_spec.rb +96 -0
  46. data/{test → spec}/fixtures/app/controllers/sample_controller.rb +0 -0
  47. data/{test → spec}/fixtures/app/models/user.rb +0 -0
  48. data/{test → spec}/fixtures/deleted_source_sample.rb +0 -0
  49. data/{test → spec}/fixtures/frameworks/rspec_bad.rb +0 -0
  50. data/{test → spec}/fixtures/frameworks/rspec_good.rb +0 -0
  51. data/{test → spec}/fixtures/frameworks/testunit_bad.rb +0 -0
  52. data/{test → spec}/fixtures/frameworks/testunit_good.rb +0 -0
  53. data/{test → spec}/fixtures/iso-8859.rb +0 -0
  54. data/{test → spec}/fixtures/resultset1.rb +0 -0
  55. data/{test → spec}/fixtures/resultset2.rb +0 -0
  56. data/{test → spec}/fixtures/sample.rb +0 -0
  57. data/{test → spec}/fixtures/utf-8.rb +0 -0
  58. data/{test → spec}/helper.rb +3 -7
  59. data/spec/merge_helpers_spec.rb +108 -0
  60. data/spec/result_spec.rb +207 -0
  61. data/spec/return_codes_spec.rb +37 -0
  62. data/spec/source_file_line_spec.rb +153 -0
  63. data/spec/source_file_spec.rb +75 -0
  64. metadata +163 -149
  65. data/test/shoulda_macros.rb +0 -19
  66. data/test/test_1_8_fallbacks.rb +0 -31
  67. data/test/test_command_guesser.rb +0 -19
  68. data/test/test_deleted_source.rb +0 -14
  69. data/test/test_file_list.rb +0 -23
  70. data/test/test_filters.rb +0 -94
  71. data/test/test_merge_helpers.rb +0 -112
  72. data/test/test_result.rb +0 -175
  73. data/test/test_return_codes.rb +0 -41
  74. data/test/test_source_file.rb +0 -73
  75. data/test/test_source_file_line.rb +0 -106
@@ -0,0 +1,75 @@
1
+ require "helper"
2
+
3
+ describe SimpleCov::SourceFile do
4
+ COVERAGE_FOR_SAMPLE_RB = [nil, 1, 1, 1, nil, nil, 1, 0, nil, nil, nil, nil, nil, nil, nil, nil]
5
+ context "a source file initialized with some coverage data" do
6
+ subject do
7
+ SimpleCov::SourceFile.new(source_fixture("sample.rb"), COVERAGE_FOR_SAMPLE_RB)
8
+ end
9
+
10
+ it "has a filename" do
11
+ expect(subject.filename).not_to be_nil
12
+ end
13
+
14
+ it "has source equal to src" do
15
+ expect(subject.src).to eq(subject.source)
16
+ end
17
+
18
+ it "has source_lines equal to lines" do
19
+ expect(subject.lines).to eq(subject.source_lines)
20
+ end
21
+
22
+ it "has 16 source lines" do
23
+ expect(subject.lines.count).to eq(16)
24
+ end
25
+
26
+ it "has all source lines of type SimpleCov::SourceFile::Line" do
27
+ subject.lines.each do |line|
28
+ expect(line).to be_a SimpleCov::SourceFile::Line
29
+ end
30
+ end
31
+
32
+ it "has 'class Foo' as line(2).source" do
33
+ expect(subject.line(2).source).to eq("class Foo\n")
34
+ end
35
+
36
+ it "returns lines number 2, 3, 4, 7 for covered_lines" do
37
+ expect(subject.covered_lines.map(&:line)).to eq([2, 3, 4, 7])
38
+ end
39
+
40
+ it "returns lines number 8 for missed_lines" do
41
+ expect(subject.missed_lines.map(&:line)).to eq([8])
42
+ end
43
+
44
+ it "returns lines number 1, 5, 6, 9, 10, 11, 15, 16 for never_lines" do
45
+ expect(subject.never_lines.map(&:line)).to eq([1, 5, 6, 9, 10, 11, 15, 16])
46
+ end
47
+
48
+ it "returns line numbers 12, 13, 14 for skipped_lines" do
49
+ expect(subject.skipped_lines.map(&:line)).to eq([12, 13, 14])
50
+ end
51
+
52
+ it "has 80% covered_percent" do
53
+ expect(subject.covered_percent).to eq(80.0)
54
+ end
55
+ end
56
+
57
+ context "simulating potential Ruby 1.9 defect -- see Issue #56" do
58
+ subject do
59
+ SimpleCov::SourceFile.new(source_fixture("sample.rb"), COVERAGE_FOR_SAMPLE_RB + [nil])
60
+ end
61
+
62
+ it "has 16 source lines regardless of extra data in coverage array" do
63
+ # Do not litter test output with known warning
64
+ capture_stderr { expect(subject.lines.count).to eq(16) }
65
+ end
66
+
67
+ it "prints a warning to stderr if coverage array contains more data than lines in the file" do
68
+ captured_output = capture_stderr do
69
+ subject.lines
70
+ end
71
+
72
+ expect(captured_output).to match(/^Warning: coverage data provided/)
73
+ end
74
+ end
75
+ end if SimpleCov.usable?
metadata CHANGED
@@ -1,70 +1,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: simplecov
3
- version: &id002 !ruby/object:Gem::Version
4
- version: 0.10.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.0
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Christoph Olszowka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2015-04-18 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- type: :runtime
16
- version_requirements: &id001 !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ~>
19
- - !ruby/object:Gem::Version
20
- version: "1.8"
21
- requirement: *id001
22
- prerelease: false
11
+ date: 2015-11-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
23
14
  name: json
24
- - !ruby/object:Gem::Dependency
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.8'
25
20
  type: :runtime
26
- version_requirements: &id003 !ruby/object:Gem::Requirement
27
- requirements:
28
- - - ~>
29
- - *id002
30
- requirement: *id003
31
21
  prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.8'
27
+ - !ruby/object:Gem::Dependency
32
28
  name: simplecov-html
33
- - !ruby/object:Gem::Dependency
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.10.0
34
34
  type: :runtime
35
- version_requirements: &id004 !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ~>
38
- - !ruby/object:Gem::Version
39
- version: 1.1.0
40
- requirement: *id004
41
35
  prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.10.0
41
+ - !ruby/object:Gem::Dependency
42
42
  name: docile
43
- - !ruby/object:Gem::Dependency
44
- type: :development
45
- version_requirements: &id005 !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ~>
48
- - !ruby/object:Gem::Version
49
- version: "1.9"
50
- requirement: *id005
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.1.0
48
+ type: :runtime
51
49
  prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.1.0
55
+ - !ruby/object:Gem::Dependency
52
56
  name: bundler
53
- description: Code coverage for Ruby 1.9+ with a powerful configuration library and automatic merging of coverage across test suites
54
- email:
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.9'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.9'
69
+ description: Code coverage for Ruby 1.9+ with a powerful configuration library and
70
+ automatic merging of coverage across test suites
71
+ email:
55
72
  - christoph at olszowka de
56
73
  executables: []
57
-
58
74
  extensions: []
59
-
60
75
  extra_rdoc_files: []
61
-
62
- files:
63
- - .gitignore
64
- - .rspec
65
- - .rubocop.yml
66
- - .travis.yml
67
- - .yardopts
76
+ files:
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".rubocop.yml"
80
+ - ".travis.yml"
81
+ - ".yardopts"
68
82
  - CHANGELOG.md
69
83
  - CONTRIBUTING.md
70
84
  - Gemfile
@@ -85,6 +99,7 @@ files:
85
99
  - features/config_profiles.feature
86
100
  - features/config_project_name.feature
87
101
  - features/config_styles.feature
102
+ - features/config_tracked_files.feature
88
103
  - features/cucumber_basic.feature
89
104
  - features/maximum_coverage_drop.feature
90
105
  - features/merging_test_unit_and_rspec.feature
@@ -130,77 +145,75 @@ files:
130
145
  - lib/simplecov/source_file.rb
131
146
  - lib/simplecov/version.rb
132
147
  - simplecov.gemspec
133
- - test/faked_project/Gemfile
134
- - test/faked_project/Rakefile
135
- - test/faked_project/cucumber.yml
136
- - test/faked_project/features/step_definitions/my_steps.rb
137
- - test/faked_project/features/support/env.rb
138
- - test/faked_project/features/test_stuff.feature
139
- - test/faked_project/lib/faked_project.rb
140
- - test/faked_project/lib/faked_project/framework_specific.rb
141
- - test/faked_project/lib/faked_project/meta_magic.rb
142
- - test/faked_project/lib/faked_project/some_class.rb
143
- - test/faked_project/spec/faked_spec.rb
144
- - test/faked_project/spec/forking_spec.rb
145
- - test/faked_project/spec/meta_magic_spec.rb
146
- - test/faked_project/spec/some_class_spec.rb
147
- - test/faked_project/spec/spec_helper.rb
148
- - test/faked_project/test/faked_test.rb
149
- - test/faked_project/test/meta_magic_test.rb
150
- - test/faked_project/test/some_class_test.rb
151
- - test/faked_project/test/test_helper.rb
152
- - test/fixtures/app/controllers/sample_controller.rb
153
- - test/fixtures/app/models/user.rb
154
- - test/fixtures/deleted_source_sample.rb
155
- - test/fixtures/frameworks/rspec_bad.rb
156
- - test/fixtures/frameworks/rspec_good.rb
157
- - test/fixtures/frameworks/testunit_bad.rb
158
- - test/fixtures/frameworks/testunit_good.rb
159
- - test/fixtures/iso-8859.rb
160
- - test/fixtures/resultset1.rb
161
- - test/fixtures/resultset2.rb
162
- - test/fixtures/sample.rb
163
- - test/fixtures/utf-8.rb
164
- - test/helper.rb
165
- - test/shoulda_macros.rb
166
- - test/test_1_8_fallbacks.rb
167
- - test/test_command_guesser.rb
168
- - test/test_deleted_source.rb
169
- - test/test_file_list.rb
170
- - test/test_filters.rb
171
- - test/test_merge_helpers.rb
172
- - test/test_result.rb
173
- - test/test_return_codes.rb
174
- - test/test_source_file.rb
175
- - test/test_source_file_line.rb
148
+ - spec/1_8_fallbacks_spec.rb
149
+ - spec/command_guesser_spec.rb
150
+ - spec/deleted_source_spec.rb
151
+ - spec/faked_project/Gemfile
152
+ - spec/faked_project/Rakefile
153
+ - spec/faked_project/cucumber.yml
154
+ - spec/faked_project/features/step_definitions/my_steps.rb
155
+ - spec/faked_project/features/support/env.rb
156
+ - spec/faked_project/features/test_stuff.feature
157
+ - spec/faked_project/lib/faked_project.rb
158
+ - spec/faked_project/lib/faked_project/framework_specific.rb
159
+ - spec/faked_project/lib/faked_project/meta_magic.rb
160
+ - spec/faked_project/lib/faked_project/some_class.rb
161
+ - spec/faked_project/lib/faked_project/untested_class.rb
162
+ - spec/faked_project/spec/faked_spec.rb
163
+ - spec/faked_project/spec/forking_spec.rb
164
+ - spec/faked_project/spec/meta_magic_spec.rb
165
+ - spec/faked_project/spec/some_class_spec.rb
166
+ - spec/faked_project/spec/spec_helper.rb
167
+ - spec/faked_project/test/faked_test.rb
168
+ - spec/faked_project/test/meta_magic_test.rb
169
+ - spec/faked_project/test/some_class_test.rb
170
+ - spec/faked_project/test/test_helper.rb
171
+ - spec/file_list_spec.rb
172
+ - spec/filters_spec.rb
173
+ - spec/fixtures/app/controllers/sample_controller.rb
174
+ - spec/fixtures/app/models/user.rb
175
+ - spec/fixtures/deleted_source_sample.rb
176
+ - spec/fixtures/frameworks/rspec_bad.rb
177
+ - spec/fixtures/frameworks/rspec_good.rb
178
+ - spec/fixtures/frameworks/testunit_bad.rb
179
+ - spec/fixtures/frameworks/testunit_good.rb
180
+ - spec/fixtures/iso-8859.rb
181
+ - spec/fixtures/resultset1.rb
182
+ - spec/fixtures/resultset2.rb
183
+ - spec/fixtures/sample.rb
184
+ - spec/fixtures/utf-8.rb
185
+ - spec/helper.rb
186
+ - spec/merge_helpers_spec.rb
187
+ - spec/result_spec.rb
188
+ - spec/return_codes_spec.rb
189
+ - spec/source_file_line_spec.rb
190
+ - spec/source_file_spec.rb
176
191
  homepage: http://github.com/colszowka/simplecov
177
- licenses:
192
+ licenses:
178
193
  - MIT
179
194
  metadata: {}
180
-
181
195
  post_install_message:
182
196
  rdoc_options: []
183
-
184
- require_paths:
197
+ require_paths:
185
198
  - lib
186
- required_ruby_version: !ruby/object:Gem::Requirement
187
- requirements:
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
188
201
  - - ">="
189
- - !ruby/object:Gem::Version
202
+ - !ruby/object:Gem::Version
190
203
  version: 1.8.7
191
- required_rubygems_version: !ruby/object:Gem::Requirement
192
- requirements:
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
193
206
  - - ">="
194
- - !ruby/object:Gem::Version
195
- version: "0"
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
196
209
  requirements: []
197
-
198
210
  rubyforge_project:
199
- rubygems_version: 2.4.6
211
+ rubygems_version: 2.4.5
200
212
  signing_key:
201
213
  specification_version: 4
202
- summary: Code coverage for Ruby 1.9+ with a powerful configuration library and automatic merging of coverage across test suites
203
- test_files:
214
+ summary: Code coverage for Ruby 1.9+ with a powerful configuration library and automatic
215
+ merging of coverage across test suites
216
+ test_files:
204
217
  - features/config_autoload.feature
205
218
  - features/config_command_name.feature
206
219
  - features/config_coverage_dir.feature
@@ -211,6 +224,7 @@ test_files:
211
224
  - features/config_profiles.feature
212
225
  - features/config_project_name.feature
213
226
  - features/config_styles.feature
227
+ - features/config_tracked_files.feature
214
228
  - features/cucumber_basic.feature
215
229
  - features/maximum_coverage_drop.feature
216
230
  - features/merging_test_unit_and_rspec.feature
@@ -234,46 +248,46 @@ test_files:
234
248
  - features/test_unit_groups_using_filter_class.feature
235
249
  - features/test_unit_without_simplecov.feature
236
250
  - features/unicode_compatiblity.feature
237
- - test/faked_project/Gemfile
238
- - test/faked_project/Rakefile
239
- - test/faked_project/cucumber.yml
240
- - test/faked_project/features/step_definitions/my_steps.rb
241
- - test/faked_project/features/support/env.rb
242
- - test/faked_project/features/test_stuff.feature
243
- - test/faked_project/lib/faked_project.rb
244
- - test/faked_project/lib/faked_project/framework_specific.rb
245
- - test/faked_project/lib/faked_project/meta_magic.rb
246
- - test/faked_project/lib/faked_project/some_class.rb
247
- - test/faked_project/spec/faked_spec.rb
248
- - test/faked_project/spec/forking_spec.rb
249
- - test/faked_project/spec/meta_magic_spec.rb
250
- - test/faked_project/spec/some_class_spec.rb
251
- - test/faked_project/spec/spec_helper.rb
252
- - test/faked_project/test/faked_test.rb
253
- - test/faked_project/test/meta_magic_test.rb
254
- - test/faked_project/test/some_class_test.rb
255
- - test/faked_project/test/test_helper.rb
256
- - test/fixtures/app/controllers/sample_controller.rb
257
- - test/fixtures/app/models/user.rb
258
- - test/fixtures/deleted_source_sample.rb
259
- - test/fixtures/frameworks/rspec_bad.rb
260
- - test/fixtures/frameworks/rspec_good.rb
261
- - test/fixtures/frameworks/testunit_bad.rb
262
- - test/fixtures/frameworks/testunit_good.rb
263
- - test/fixtures/iso-8859.rb
264
- - test/fixtures/resultset1.rb
265
- - test/fixtures/resultset2.rb
266
- - test/fixtures/sample.rb
267
- - test/fixtures/utf-8.rb
268
- - test/helper.rb
269
- - test/shoulda_macros.rb
270
- - test/test_1_8_fallbacks.rb
271
- - test/test_command_guesser.rb
272
- - test/test_deleted_source.rb
273
- - test/test_file_list.rb
274
- - test/test_filters.rb
275
- - test/test_merge_helpers.rb
276
- - test/test_result.rb
277
- - test/test_return_codes.rb
278
- - test/test_source_file.rb
279
- - test/test_source_file_line.rb
251
+ - spec/1_8_fallbacks_spec.rb
252
+ - spec/command_guesser_spec.rb
253
+ - spec/deleted_source_spec.rb
254
+ - spec/faked_project/Gemfile
255
+ - spec/faked_project/Rakefile
256
+ - spec/faked_project/cucumber.yml
257
+ - spec/faked_project/features/step_definitions/my_steps.rb
258
+ - spec/faked_project/features/support/env.rb
259
+ - spec/faked_project/features/test_stuff.feature
260
+ - spec/faked_project/lib/faked_project.rb
261
+ - spec/faked_project/lib/faked_project/framework_specific.rb
262
+ - spec/faked_project/lib/faked_project/meta_magic.rb
263
+ - spec/faked_project/lib/faked_project/some_class.rb
264
+ - spec/faked_project/lib/faked_project/untested_class.rb
265
+ - spec/faked_project/spec/faked_spec.rb
266
+ - spec/faked_project/spec/forking_spec.rb
267
+ - spec/faked_project/spec/meta_magic_spec.rb
268
+ - spec/faked_project/spec/some_class_spec.rb
269
+ - spec/faked_project/spec/spec_helper.rb
270
+ - spec/faked_project/test/faked_test.rb
271
+ - spec/faked_project/test/meta_magic_test.rb
272
+ - spec/faked_project/test/some_class_test.rb
273
+ - spec/faked_project/test/test_helper.rb
274
+ - spec/file_list_spec.rb
275
+ - spec/filters_spec.rb
276
+ - spec/fixtures/app/controllers/sample_controller.rb
277
+ - spec/fixtures/app/models/user.rb
278
+ - spec/fixtures/deleted_source_sample.rb
279
+ - spec/fixtures/frameworks/rspec_bad.rb
280
+ - spec/fixtures/frameworks/rspec_good.rb
281
+ - spec/fixtures/frameworks/testunit_bad.rb
282
+ - spec/fixtures/frameworks/testunit_good.rb
283
+ - spec/fixtures/iso-8859.rb
284
+ - spec/fixtures/resultset1.rb
285
+ - spec/fixtures/resultset2.rb
286
+ - spec/fixtures/sample.rb
287
+ - spec/fixtures/utf-8.rb
288
+ - spec/helper.rb
289
+ - spec/merge_helpers_spec.rb
290
+ - spec/result_spec.rb
291
+ - spec/return_codes_spec.rb
292
+ - spec/source_file_line_spec.rb
293
+ - spec/source_file_spec.rb
@@ -1,19 +0,0 @@
1
- module ShouldaMacros
2
- def should_be(boolean_flag)
3
- should "be #{boolean_flag}" do
4
- assert_equal true, subject.send(boolean_flag)
5
- end
6
- end
7
-
8
- def should_not_be(boolean_flag)
9
- should "not be #{boolean_flag}" do
10
- assert_equal false, subject.send(boolean_flag)
11
- end
12
- end
13
-
14
- def should_have(attr_name, expectation)
15
- should "have #{attr_name} == #{expectation.inspect}" do
16
- assert_equal expectation, subject.send(attr_name)
17
- end
18
- end
19
- end