spec/guards_helper.rb in sequel-4.49.0 vs spec/guards_helper.rb in sequel-5.0.0
- old
+ new
@@ -1,11 +1,11 @@
gem 'minitest'
require 'minitest/autorun'
require 'minitest/hooks/default'
require 'minitest/shared_description'
-require "#{File.dirname(__FILE__)}/deprecation_helper.rb"
+require_relative "deprecation_helper"
def Sequel.guarded?(*checked)
unless ENV['SEQUEL_NO_PENDING']
checked.each do |c|
case c
@@ -34,9 +34,10 @@
module Minitest::Spec::DSL
def cspecify(message, *checked, &block)
if pending = Sequel.guarded?(*checked)
it(message) do
+ proc{instance_exec(&block)}.must_raise(Exception) if ENV['SEQUEL_CHECK_PENDING']
skip "Not yet working on #{Array(pending).map{|x| x.is_a?(Proc) ? :proc : x}.join(', ')}"
end
else
it(message, &block)
end