我在使用Calabash-Android和Cucumber定义我自己的步骤时遇到了一些问题。
我的步骤定义文件包含
require 'calabash-android/calabash_steps'
Given /^I wait for obb download$/ do
pending
end
我收到的错误消息是
Calabash-Android/features/step_definitions/calabash_steps.rb:1: syntax error, unexpected tCONSTANT, expecting end-of-input
Given /^I wait for obb download$/ ...
... ^ (SyntaxError)
我尝试使用Given
和When
介词,无论我放在do
块中,我都会遇到同样的错误。当我注释掉requires
时,它会运行,但是当我到达那一步时会崩溃。当我注释掉我的步骤定义并删除我的步骤时,它也有效。
我还尝试了/
/^
,/
,$/
和""
的所有组合,但我仍然遇到同样的错误。
任何帮助将不胜感激。感谢。