1
命令我教我如何使用捆扎机的guide使自己的Ruby宝石的基本知识。然而,当我去与Aruba /黄瓜设置CLI测试我一直运行到一个问题:红宝石阿鲁巴测试中找不到PATH变量
Command "co2domain" not found in PATH-variable "C:/.../PATH variables". (Aruba::LaunchError)
我做的唯一差别是改变一些示例的名字,因为我想最终来样订做将公司名称转换为适当域名的宝石。
这里是我的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
我作为一个初学者,指导,对初学者我感觉我我错失了一些小而重要的东西。帮助赞赏。