【发布时间】:2017-07-18 18:58:52
【问题描述】:
我正在自学如何使用 Bundler 的 guide 制作自己的 Ruby Gem 的基础知识。但是,当我开始使用 aruba/cucumber 设置 CLI 测试时,我一直遇到问题:
Command "co2domain" not found in PATH-variable "C:/.../PATH variables". (Aruba::LaunchError)
我所做的唯一区别是更改了示例的一些名称,因为我最终希望构建一个将公司名称转换为其正确域的 gem。
这是我的 company.feature 文件:
Feature: Company
In order to portray Company
As a CLI
I want to be as objective as possible
Scenario: Positive number
When I run `co2domain portray --num 2`
Then the output should contain "positive"
Scenario: Negative number
When I run `co2domain portray --num -22`
Then the output should contain "negative"
这是我的 company.rb 文件:
module Co2domain
class Company
def self.portray(num)
if num > 0
"positive"
else
"negative"
end
end
end
end
由于我是初学者,而且该指南是为初学者准备的,我觉得我遗漏了一些小而重要的东西。帮助表示赞赏。
【问题讨论】:
标签: ruby rubygems cucumber aruba