0

I'm having some issues defining my own steps using Calabash-Android and Cucumber.

My step definition file contains

require 'calabash-android/calabash_steps'

Given /^I wait for obb download$/ do
    pending
end

And the error message I am getting is

Calabash-Android/features/step_definitions/calabash_steps.rb:1: syntax error, unexpected tCONSTANT, expecting end-of-input

Given /^I wait for obb download$/ ...
...                               ^ (SyntaxError)

I have tried using the Given and When prepositions and no matter what I put inside the do block, I get the same error. When I comment out requires, it will run, but crash when I get to that step. It also works when I comment out my step definition and remove my step.

I have also tried every combination of / /^, /, $/, and "" and I still get the same error.

Any assistance would be appreciated. Thanks.

Stephen S
  • 166
  • 1
  • 1
  • 12
  • Can you please post the exact 1.) step definition you wrote. 2.) The step you called in your feature file. 3.) Error log from the console. – Chathura Palihakkara Apr 05 '14 at 17:59
  • check this one too..http://stackoverflow.com/questions/7317332/what-is-syntax-error-unexpected-tconstant-error-in-ruby – Chathura Palihakkara Apr 05 '14 at 18:46
  • @ChathuraPalihakkara 1.) The first box is the exact definition 2.) `Given I wait on obb download` 3.) The second box is the exact error log I already saw that link. The issue with that link was failing to close quotations, but I've already checked and changed mine to every possible combination. I even copy-pasted straight from the Github Wiki on it to no success. – Stephen S Apr 06 '14 at 22:22
  • I just check it with `Given /^I wait for obb download$/ do puts "obb download" end` it works fine. may be your pending action have some syntax error. – Chathura Palihakkara Apr 07 '14 at 04:13
  • I tried your code and I am getting the exact same thing. Here's a screenshot with irrelevant stuff cropped out: http://cl.ly/UrEd. Maybe that would help more. – Stephen S Apr 07 '14 at 19:22
  • Can you check your calabash-android console working ? (do UI queries get correct answers?). It seems step is correct. Did it work fine for other steps definitions you wrote? – Chathura Palihakkara Apr 08 '14 at 09:07
  • That's my only step definition. Everything else I have in my features file are [canned steps](https://github.com/calabash/calabash-android/blob/master/ruby-gem/lib/calabash-android/canned_steps.md). And I cannot check if those work because they time out while waiting on the obbs to download. I tried changing the wait_timeout globally and by using the canned step `Then I wait up to 3600 seconds...`(big download), but that still times out way too soon, so I am trying this and using `wait_for(:timeout => 3600) {...` in hopes that it will work. – Stephen S Apr 08 '14 at 17:30
  • Did you try UI queries...Try some and check weather system environment works fine. https://github.com/calabash/calabash-android/wiki/05-Query-Syntax Open your app manually on the simulator and run a query from console. – Chathura Palihakkara Apr 09 '14 at 04:33

0 Answers0