Skip to content

Commit

Permalink
Kill Measurement#ok? mutations
Browse files Browse the repository at this point in the history
  • Loading branch information
John Backus committed Sep 29, 2015
1 parent 5881c44 commit 1db9e6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/mutant.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: yardstick
namespace: Yardstick
expect_coverage: 2351/2400
expect_coverage: 2346/2394
ignore_subjects:
# sometimes creates a neutral failure
- Yardstick::Rake::Measurement#define
2 changes: 1 addition & 1 deletion lib/yardstick/measurement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def initialize(rule)
#
# @api public
def ok?
@result.equal?(true) || skip?
skip? || @result
end

# Return true if the measurement was skipped
Expand Down
6 changes: 6 additions & 0 deletions spec/unit/yardstick/measurement/ok_predicate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@

it { should be(false) }
end

context 'when rule is disabled' do
let(:rule) { DisabledRule.new(document) }

it { should be(true) }
end
end

0 comments on commit 1db9e6c

Please sign in to comment.