rspe c - ошибка шаблона rails после повышения версии Rails - PullRequest
0 голосов
/ 07 января 2020

Я поднял приложение Rails до 6.0 и теперь получаю ошибки в моих тестах:

 Failure/Error: get :toggle, params: { id: allowed.id }

 ActionView::Template::Error:
   wrong number of arguments (given 2, expected 1)

В моем Gemfile у меня есть:

group :test do
  gem 'rspec-rails'
end

Если я попытаюсь gem 'rspec-rails', '~> 4.0' как сказано в руководстве по установке в их Github readme.md, я получаю

Could not find gem 'rspec-rails (~> 4.0)' in any of the gem sources listed in your Gemfile.

Если я пытаюсь заменить gem 'rspec-rails' на:

gem 'rspec-rails', git: 'https://github.com/rspec/rspec-rails', branch: '4-0-maintenance'
gem 'rspec-core', git: 'https://github.com/rspec/rspec-core'
gem 'rspec-mocks', git: 'https://github.com/rspec/rspec-mocks'
gem 'rspec-support', git: 'https://github.com/rspec/rspec-support'
gem 'rspec-expectations', git: 'https://github.com/rspec/rspec-expectations'

Тогда я получаю ...

Bundler could not find compatible versions for gem "rspec-core":
  In Gemfile:
    rspec-core

    guard-rspec was resolved to 4.7.3, which depends on
      rspec (>= 2.99.0, < 4.0) was resolved to 3.9.0, which depends on
        rspec-core (~> 3.9.0)

    rspec-sidekiq was resolved to 3.0.3, which depends on
      rspec-core (>= 3.0.0, ~> 3.0)

Could not find gem 'rspec-core (~> 3.9.0)', which is required by gem 'rspec-sidekiq', in any of the relevant sources...

Буду признателен за помощь / указатели. ТИА

...