本文介绍了Rails 4和RSpec,路由规范中的未定义方法“断言"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了与未定义方法'assertions'相同的问题在布线规范中,但是我正在运行Rails 4,并且它被锁定为minitest 5.0或更高版本.因此,使用minitest 4.7的解决方案无法完成.有没有解决的办法?我将在哪里报告该错误?
I'm having what appears to be the same issue as undefined method `assertions' in routing spec but I'm running Rails 4 and it is locked to minitest 5.0 or greater. Thus the solution to use minitest 4.7 I can't make work. Is there a work around for this? Where would I report the bug?
推荐答案
此问题是由此处记录的minitest 5.0的更改引起的:
This problem is caused by a change in minitest 5.0 documented here:
# https://github.com/seattlerb/minitest/issues/286
通过使用以下方式修复:
is fixed by using:
gem "rspec-rails", '~> 2.14.0.rc1'
在gemfile中.
这篇关于Rails 4和RSpec,路由规范中的未定义方法“断言"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!