module Shoulda
  module Matchers
    if defined?(Test::Unit::AssertionFailedError)
      AssertionError = Test::Unit::AssertionFailedError
    elsif Gem.ruby_version >= Gem::Version.new("1.9")
      require 'minitest/unit'
      AssertionError = MiniTest::Assertion
    else
      raise "No unit test library available"
    end
  end
end
module Shoulda
  module Matchers
    if Gem.ruby_version >= Gem::Version.new('1.8') && Gem.ruby_version < Gem::Version.new('1.9')
      require 'test/unit'
      AssertionError = Test::Unit::AssertionFailedError
    elsif Gem.ruby_version >= Gem::Version.new("1.9")
      require 'minitest/unit'
      AssertionError = MiniTest::Assertion
    else
      raise "No unit test library available"
    end
  end
end

Fix the build on Ruby 1.8 using Test::Unit
Fix the build on Ruby 1.8 using Test::Unit
