Skip to content

Commit

Permalink
Workaround for missing test/unit/assertions when running specs
Browse files Browse the repository at this point in the history
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
(seomoz/qless-core#64).
  • Loading branch information
tom93 authored and Techno-coder committed Feb 15, 2020
1 parent b1a97e8 commit 3012a65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/test/unit/assertions.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3012a65

Please sign in to comment.