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
我作爲一個初學者,指導,對初學者我感覺我我錯失了一些小而重要的東西。幫助讚賞。