2017-07-18 53 views
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 

我作爲一個初學者,指導,對初學者我感覺我我錯失了一些小而重要的東西。幫助讚賞。

回答

0

您所看到的錯誤等同於您所使用的手冊中找到sh: foodie: command not found錯誤。所不同的是,你使用的是Windows機器,並且在引導使用* nix中的機器。

黃瓜測試測試從殼體的命令,並且殼是無法找到運行命令。如果添加程序所在的目錄到PATH,或將你的程序在你的路徑中的目錄,黃瓜應該可以運行它。