首页 文章

路由规范中未定义的方法`断言'

提问于
浏览
1

1) JunksController routing routes to #index Failure/Error: get("/junks").should route_to("junks#index") NoMethodError: undefined methodassertions' for #<#Class:0x007ff8d62c8568:0x007ff8d13e2f20> # ./spec/routing/junks_routing_spec.rb:7:in block (3 levels) in <top (required)>'

我唯一的提示是MiniTest v5正在抛弃弃用警告 .

MiniTest::Unit::TestCase is now Minitest::Test. From /Users/username/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/test/unit/testcase.rb:8:inmodule:Unit'`

在最近的Gems更新中,我开始为我的所有路由规范获取一个未定义的方法`assertions' . 我生成了一个新的脚手架,它也引发了同样的错误

版本:

  • rails(3.2.13)

  • rspec(2.13.0)

  • rspec-core(〜> 2.13.0)

  • rspec-expectations(〜> 2.13.0)

  • rspec-mocks(〜> 2.13.0)

  • rspec-rails(2.13.2)

  • minitest(5.0.2)

  • 水豚(2.1.0)

  • 机架测试(0.6.2)

1 回答

  • 0

    事实证明Minitest宝石是罪魁祸首 . 我锁定了宝石的版本,所有路由规范都再次通过 . 是啊!

    gem 'minitest', '~> 4.0'

相关问题