test/helper.rb in tracksperanto-3.5.9 vs test/helper.rb in tracksperanto-4.0.0

- old
+ new

@@ -1,26 +1,28 @@ -# -*- encoding : utf-8 -*- require "rubygems" -require File.dirname(__FILE__) + '/../lib/tracksperanto' unless defined?(Tracksperanto) +require File.dirname(__FILE__) + '/../lib/tracksperanto' require 'test/unit' require 'fileutils' require 'bundler' Bundler.require :development unless File.exist?(File.dirname(__FILE__) + "/import/samples") puts "Please run tests on a git checkout from http://github.com/guerilla-di/tracksperanto" - puts "so that you also have the 17-something megs of the test corpus to test against. Aborting." + puts "so that you also have the 17+ MB of the test corpus data to test against. Aborting." exit 1 end -# We are limited to flexmock 0.8 on Ruby 1.8 -# http://redmine.ruby-lang.org/issues/4882 -# https://github.com/jimweirich/flexmock/issues/4 -# https://github.com/julik/flexmock/commit/4acea00677e7b558bd564ec7c7630f0b27d368ca -class FlexMock::PartialMockProxy - def singleton?(method_name) - @obj.singleton_methods.include?(method_name.to_s) +require 'flexmock' +require 'flexmock/test_unit' + +# Fix methods being considered private on Ruby 2.4+ sice otherwise +# Forwardable complains. Upstream patch should be filed to flexmock, +# which now apparently lives at https://github.com/doudou/flexmock +class FlexMock + def respond_to_missing?(method_name, is_public) + return true if is_public + false end end class Test::Unit::TestCase # Runs the block with a temporary directory. The directory will be removed