Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source :rubygems
source 'https://rubygems.org'

gemspec :name => "wrong"

Expand Down
5 changes: 5 additions & 0 deletions lib/wrong/adapters/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ def failure_class
MiniTest::Assertion
end

if MiniTest::VERSION >= "5.0.6"
alias_method :_assertions, :assertions
alias_method :"_assertions=", :"assertions="
end

def aver(valence, explanation = nil, depth = 0)
self._assertions += 1 # increment minitest's assert count
super(valence, explanation, depth + 1) # apparently this passes along the default block
Expand Down