It seems wrong is taking over Test::Unit's assert function, causing the function to crash. The alias_assert also doesn't help, since it just aliases the method - the assert method is still there.
I am currently using the following as a workaround:
obj = Object.new
class << obj
include Test::Unit::Assertions
end
Wrong::Assert.send(:define_method, :assert) do |*args, &block|
obj.assert(*args, &block)
end
It works, but it would be nice if a better solution was available.
assert_select is apparently using Test::Unit but you're only including the rspec adapter. Try requiring the test_unit adapter too and see if that works.
I am using rspec with wrong in a rails app. I have the followin in my
spec_helper.rb
file:However, when I used
assert_select
, eg:I get the error:
The exception is thrown from
on line 297:
It seems wrong is taking over Test::Unit's
assert
function, causing the function to crash. Thealias_assert
also doesn't help, since it just aliases the method - theassert
method is still there.I am currently using the following as a workaround:
It works, but it would be nice if a better solution was available.