2017-07-18 55 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,或将你的程序在你的路径中的目录,黄瓜应该可以运行它。