2017-01-30 10 views
1

私がzeusを起動すると、可能なコマンドの1つとしてzeus cucumberが提供されません。他はデフォルトでこれを取得するようです。少なくとも私は、zeus cucumberを含むzeus startからの出力を示すいくつかのゼウス書き込みを見てきました。特別な設定や追加の設定が必要なことについては何も言いません。キュウリをゼウスでどのように使用しますか?

私はこの問題のトラブルシューティングを開始する場所を本当に知りません。私はグーグルで「ゼウスでキュウリを使う」とここで検索しました。セットアップに関する議論は一切ありません。私が得る唯一の結果は、そこにあるはずであることを当然のように思う人々からであり、正しく機能していない問題を調査している。

答えて

1

Zeusのthis custom planファイルを使用してください。アプリケーションのルートにcustom_plan.rbという名前で保存してください。

require 'zeus/rails'     

# 1. Add the cucumber methods (below) to your custom plan (or take this file if 
# you don't have an existing custom_plan). 
# 
# 2. Add the following line to the test_environment section of your zeus.json: 
# 
# "cucumber_environment": {"cucumber": []} 

class CucumberPlan < Zeus::Rails   
    def cucumber_environment 
    ::Rails.env = ENV['RAILS_ENV'] = 'test' 
    require 'cucumber/rspec/disable_option_parser' 
    require 'cucumber/cli/main' 
    @cucumber_runtime = Cucumber::Runtime.new 
    end 

    def cucumber(argv=ARGV) 
    cucumber_main = Cucumber::Cli::Main.new(argv.dup) 
    had_failures = cucumber_main.execute!(@cucumber_runtime) 
    exit_code = had_failures ? 1 : 0 
    exit exit_code 
    end 
end 

Zeus.plan = CucumberPlan.new 
+0

コードフェンスから 'require 'zeus/rails'を置き去りにしました。しかし、そうでなければ、素晴らしい - ありがとう! – Avram

関連する問題