ruby:使用规范测试时给出的最小编写设置

ruby:使用规范测试时给出的最小编写设置,ruby,rspec,cucumber,capybara,Ruby,Rspec,Cucumber,Capybara,我是ruby,在ruby(而不是rails)中测试时给出 我有一个名为Infrastructure的空文件夹。它有一个名为spec的文件夹。 其中有一个名为features的文件夹。在这方面,我有一个名为foo的功能,如下所示: ~/gray/infrastructure (master *)[]$ cat spec/features/foo.feature Scenario: View last incidents Given Linda is logged in # This will

我是ruby,在ruby(而不是rails)中测试时给出

我有一个名为Infrastructure的空文件夹。它有一个名为spec的文件夹。 其中有一个名为features的文件夹。在这方面,我有一个名为foo的功能,如下所示:

~/gray/infrastructure (master *)[]$ cat spec/features/foo.feature 
Scenario: View last incidents
  Given Linda is logged in # This will in fact invoke 2 step definitions
  When I go to the incident page
运行等级库命令时,将忽略要素文件。 我错过了什么

仅供参考以下是我的创业板环境:

~/gray/infrastructure (master *)[]$ rvm-prompt
ruby-2.3.0-preview1@infrastructure
~/gray/infrastructure (master *)[]$ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.7)
builder (3.2.2)
bundler-unload (1.0.2)
cucumber (2.3.2)
cucumber-core (1.4.0)
cucumber-wire (0.0.1)
did_you_mean (1.0.0.beta3)
diff-lcs (1.2.5)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
gherkin (3.2.0)
io-console (0.4.3)
json (1.8.2)
minitest (5.8.2)
multi_json (1.11.2)
multi_test (0.1.2)
net-telnet (0.1.1)
power_assert (0.2.6)
psych (2.0.14)
rake (10.4.2)
rdoc (4.2.0)
rspec (3.4.0)
rspec-core (3.4.4)
rspec-expectations (3.4.0)
rspec-mocks (3.4.1)
rspec-support (3.4.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
test-unit (3.1.5)

您编写了cucumber特性,而不是RSpec特性测试。Cucumber features应位于名为features的文件夹中,与spec文件夹处于同一级别。它们使用
cumber
而不是
spec