1

I am new to calabash and working with it since past few months. When I execute the pre-defined step I get below path "# calabash-cucumber-0.11.4/feature/step-definitios/calabash-steps.rb"

I know its associated with my workspace somehow but I am not able to get this calabash-steps.rb file (neither in my system nor on Google)

Can someone help me in getting this file. I just wanna see how the implementation is done for the step.

A lot of thanks in advance!

jsborn17
  • 455
  • 1
  • 7
  • 12

2 Answers2

0

Those files will be in the gems library itself. If you are on a mac, open a terminal and type

which calabash-android

The output will be a file path to where the gem is installed. If you look there there will be the files you are looking for.

If you are on windows you can run

gem env

and it will output a bunch of info and the GEM PATH section is the bit you want.

Mine looks like this

  • GEM PATHS:
    • C:/Ruby193/lib/ruby/gems/1.9.1

If you're getting started writing custom steps then you should check out the docs - https://github.com/calabash/calabash-ios/wiki/03-Writing-custom-steps

alannichols
  • 1,496
  • 1
  • 10
  • 20
0

The file can be found in the Calabash iOS repo.

One of the of the problems with using predefined steps is that you can't edit them (easily).

If you want to explore the predefined steps (edit them, set break points, etc.), I suggest copying the calabash_steps.rb file into your local features/step_definitions directory and updating your features/support/env.rb file to not load the predefined steps from the gem.

This code comment in the features explains how to not include the predefined steps shipped with the Calabash gem.

If you use bundler + Gemfile (which we strongly recommend), you can find where the gem is installed:

$ bundle show calabash-cucumber

As an aside, you should update to the most recent version of Calabash iOS (0.14.3 as of this writing).

jmoody
  • 2,480
  • 1
  • 16
  • 22