From 3012a6541b1266be63d649f0bf8f39db84d492be Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sun, 3 Feb 2019 15:55:26 +1300 Subject: [PATCH] Workaround for missing test/unit/assertions when running specs Now most of the tests pass. Submissions fail with the message "Lua redis() command arguments must be strings or integers" because of incompatible qless and redis versions (https://github.com/seomoz/qless-core/pull/64). --- spec/test/unit/assertions.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/test/unit/assertions.rb diff --git a/spec/test/unit/assertions.rb b/spec/test/unit/assertions.rb new file mode 100644 index 00000000..38c3b204 --- /dev/null +++ b/spec/test/unit/assertions.rb @@ -0,0 +1,16 @@ +# This files provides test/unit/assertions for rspec-rails <3.2.0 by +# aliasing Test::Unit::Assertions to MiniTest::Assertions. +# When rspec-rails is updated to 3.2.0+ this file should be removed. +# +# test/unit/assertions was removed from ruby-core in 2.2.0 (https://bugs.ruby-lang.org/issues/9711). +# rspec-rails <3.2.0 doesn't handle the removal on rails 4.0.x (fixed in https://github.com/rspec/rspec-rails/pull/1264). +require 'active_support/deprecation' +ActiveSupport::Deprecation.warn 'This file should be removed when rspec-rails is updated to 3.2.0+' + +require 'minitest/unit' + +module Test + module Unit + Assertions = MiniTest::Assertions + end +end