lib/assert_value.rb in assert_value-1.5 vs lib/assert_value.rb in assert_value-1.5.1
- old
+ new
@@ -4,11 +4,11 @@
# 1) Test::Unit from Ruby <= 1.8.7 and Ruby >= 2.2.2
# 2) Minitest 2.x-4.x, either bundled with Ruby 1.9 - 2.1 or installed via gem
# 3) Minitest > 5.0 bundles with Ruby >= 2.2.2 or installed via gem
# 4) RSpec
begin
- require 'minitest/autorun' # Minitest 5.x
+ require 'minitest' # Minitest 5.x
rescue LoadError
begin
require 'minitest/unit' # old Minitest
rescue LoadError
begin
@@ -23,11 +23,13 @@
ASSERT_VALUE_TEST_FRAMEWORK = :new_minitest
elsif defined?(MiniTest)
ASSERT_VALUE_TEST_FRAMEWORK = :old_minitest
elsif defined?(Test)
ASSERT_VALUE_TEST_FRAMEWORK = :test_unit
-else
+elsif defined?(RSpec)
ASSERT_VALUE_TEST_FRAMEWORK = :rspec_only
+else
+ raise "assert_value requires at least one of the minitest, test-unit, and rspec gems"
end
require 'text_diff'
require 'pathname'