spec/spec_helper.rb in minigit-0.0.3 vs spec/spec_helper.rb in minigit-0.0.4

- old
+ new

@@ -9,21 +9,26 @@ SimpleCov.start do command_name 'MiniTest::Spec' minimum_coverage 95 end -require 'minitest/spec' require 'minitest/autorun' +require 'minitest/spec' require 'mocha/setup' require 'wrong' -require 'wrong/adapters/minitest' -begin - require 'minitest/ansi' -rescue LoadError # that's fine, we'll live without it -else - MiniTest::ANSI.use! if STDOUT.tty? +class MiniGit + module Spec + module WrongHelper + include Wrong::Assert + include Wrong::Helpers + + def increment_assertion_count + self.assertions += 1 + end + end + end end require 'minigit' # MiniTest pokes into these methods, and triggers errors from @@ -32,9 +37,11 @@ def self.to_str ; to_s ; end def self.to_ary ; to_a ; end end class MiniTest::Spec + include MiniGit::Spec::WrongHelper + attr_reader :tmp_path before do @tmp_path = Pathname.new(__FILE__).dirname.dirname.join('tmp').expand_path end end