2017-04-10 1 views
-2

나는 Reuse Cucumber steps을 따라 갔다.오이 고급 단계 정의 - 구문 오류, 예상치 못한 tidenizer, 예상 키워드 _end

저는 Ruby와 Cucumber에 관해서는 멍청한 짓입니다. 내가 호리병박 - 안드로이드 0.9.0와 오이를 사용하고
2.4.0

내 calabash_steps.rb :

require 'calabash-android/calabash_steps' 

Then /^I add the 1st bestsellers product to bag$/ do 
    steps %Q { 
     # App restarts and Onboarding screen shows again 
     Given I see the text "next" 
     Then I press the "next" button 
    } 
end 

전체 스택 트레이스 :

❯ bundle exec calabash-android run app/build/outputs/apk/app-staging-debug.apk -t @bag 
/Users/eric/AndroidStudioProjects/xxx/features/step_definitions/calabash_steps.rb:7: syntax error, unexpected tIDENTIFIER, expecting keyword_end 
Then I press the "next" button 
          ^(SyntaxError) 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!' 
/Users/eric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>' 
/Users/eric/.rbenv/versions/2.4.0/bin/cucumber:22:in `load' 
/Users/eric/.rbenv/versions/2.4.0/bin/cucumber:22:in `<main>' 
+0

성가신 사람들은 코멘트를 떠나지 않고 내 질문에 downvoting 계속 필요? 나는 내 질문을 개선하기 위해, 모든 일을 기꺼이, StackOverflow의 책임 사용자하시기 바랍니다 – ericn

답변

0

가 문제가있는 여분의 공간이었다 steps %Q {으로 변경하면 steps %Q{이됩니다.
Java 및 Javascript의 가독성을 위해 공백 문자를 남용하는 습관이 있습니다.

은 '호리병박 - 안드로이드/calabash_steps'

Then /^I add the 1st bestsellers product to bag$/ do 
    steps %Q{ 
     # App restarts and Onboarding screen shows again 
     Given I see the text "next" 
     Then I press the "next" button 
    } 
end 
관련 문제