【问题标题】:Cucumber. How to enable code completion for RSpec assertions in RubyMine黄瓜。如何在 RubyMine 中为 RSpec 断言启用代码完成
【发布时间】:2020-05-11 17:45:39
【问题描述】:

我将 Cucumber 与 Rspec 断言一起使用。

他们的documentation 说:

rspec-expectations gem 添加到您的 Gemfile 中。 Cucumber 将自动加载 RSpec 的匹配器和期望方法,以便在您的步骤定义中可用。

它工作正常,但 RubyMine 2020.1 无法识别 RSpec,并且步骤定义中的代码自动完成无法按预期工作:

Given /^a nice new bike$/ do
  expect(@bikes).to have_key("new")
end

当我开始输入 exp... 时,IDE 不建议 expect 并且 have_key 带有警告 Cannot find have_key 下划线。 是否有可能使此功能起作用?

【问题讨论】:

  • 添加了rubymine,因为这实际上与 ruby​​、rspec 或 cucumber 无关。

标签: ruby rspec cucumber rubymine


【解决方案1】:

目前 RubyMine 不支持它。请添加您的投票并按照相应的要求:

https://youtrack.jetbrains.com/issue/RUBY-26444

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-28
    • 1970-01-01
    • 2010-11-29
    相关资源
    最近更新 更多