Sha256: 8d3a42413fa94d2d4355f8ee6f6c7d2fb32a79338cf4ba611c3d7b7134d87c1c

Contents?: true

Size: 963 Bytes

Versions: 7

Compression:

Stored size: 963 Bytes

Contents

$:.unshift(File.dirname(__FILE__)+'/../lib/')

require 'statsample'
require 'minitest/unit'
require 'tempfile'
require 'tmpdir'
require 'shoulda'

module MiniTest
  class Unit
    class TestCase
      include Shoulda::InstanceMethods
      extend Shoulda::ClassMethods
      include Shoulda::Assertions

    end
  end

  module Assertions
    alias :assert_raise :assert_raises unless method_defined? :assert_raise
    alias :assert_not_equal :refute_equal unless method_defined? :assert_not_equal
    alias :assert_not_same :refute_same unless method_defined? :assert_not_same
    unless method_defined? :assert_nothing_raised
      def assert_nothing_raised(msg=nil)
        msg||="Nothing should be raised, but raised %s"
        begin
          yield
          not_raised=true
        rescue Exception => e
          not_raised=false
          msg=sprintf(msg,e)
        end
        assert(not_raised,msg)
      end
    end
  end
end

MiniTest::Unit.autorun

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
statsample-0.14.0 test/helpers_tests.rb
statsample-0.13.1 test/helpers_tests.rb
statsample-0.13.0 test/helpers_tests.rb
statsample-0.12.0 test/helpers_tests.rb
statsample-0.11.2 test/helpers_tests.rb
statsample-0.11.1 test/helpers_tests.rb
statsample-0.11.0 test/helpers_tests.rb