I'm trying to use the ABase class as a base class for my screen objects. I've created my own base class for my screen object which inherits from ABase:
abd_base.rb
require 'calabash-android/abase'
class ABDBase < Calabash::ABase
#some general stuff for all screens
end
When I run my features I get the folllowing error:
vbus-imac:Calabash bdumgr$ ANDROID_HOME=/Users/bdumgr/Downloads/android-sdk-macosx calabash-android run MyAwesome.apk -v -r android/*
2014-08-26 12:32:04 - JDK found on PATH.
2014-08-26 12:32:04 - Android SDK found at: /Users/bdumgr/Downloads/android-sdk-macosx
2014-08-26 12:32:04 - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -S cucumber -v -r android/abd_base.rb android/abd_signing_base.rb android/screens android/support MAIN_ACTIVITY=my.awesome.MainActivity APP_PATH="/Users/bdumgr/Desktop/Calabash/MyAwesome.apk" TEST_APP_PATH="test_servers/9d50fca29b39a78705d82cecd025c7e5_0.5.1.apk"
Code:
* android/abd_base.rb
uninitialized constant Calabash (NameError)
/Library/Ruby/Gems/2.0.0/gems/calabash-android-0.5.1/lib/calabash-android/abase.rb:1:in `<top (required)>'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
/Users/bdumgr/Desktop/Calabash/android/abd_base.rb:1:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/rb_support/rb_language.rb:95:in `load'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:82:in `each'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:184:in `load_step_definitions'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/runtime.rb:42:in `run!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/lib/cucumber/cli/main.rb:47:in `execute!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.16/bin/cucumber:13:in `<top (required)>'
/usr/bin/cucumber:23:in `load'
/usr/bin/cucumber:23:in `<main>'
It looks like it doesn't understand "include Calabash::Android::Operations" in "class Calabash::ABase".
Do I need to do anything special to use ABase?
My project structure is as follows:
Calabash
|_android
| |_screens
| | |_menu_screen.rb
| |_support
| | |_//default support files from calabash-android
| |_abd_base.rb
| |_abd_signing_base.rb
|_features
| |_step_definitions
| | |_//default and custom step definitions
| |_//some features
|_test_servers
| |_//generated test servers
My gems are up to date. Here is a list of my installed gems:
*** LOCAL GEMS ***
activesupport (4.1.5, 3.2.19)
awesome_print (1.2.0)
bigdecimal (1.2.5, 1.2.0)
builder (3.2.2)
bundler (1.7.2, 1.7.0, 1.6.5, 1.6.3)
calabash (1.2.1)
calabash-android (0.5.1, 0.4.21)
calabash-common (0.0.1)
calabash-cucumber (0.9.169)
CFPropertyList (2.2.8, 2.2.0)
claide (0.6.1)
cocoapods (0.33.1)
cocoapods-core (0.33.1)
cocoapods-downloader (0.6.1)
cocoapods-plugins (0.2.0)
cocoapods-trunk (0.1.4)
cocoapods-try (0.3.0)
colored (1.2)
cucumber (1.3.16, 1.3.15)
debase (0.0.9)
debugger-ruby_core_source (1.3.5)
diff-lcs (1.2.5)
edn (1.0.6)
escape (0.0.4)
fuzzy_match (2.1.0, 2.0.4)
geocoder (1.2.4, 1.2.3, 1.1.9)
gherkin (2.12.2)
httpclient (2.4.0, 2.3.4.1)
i18n (0.6.11)
io-console (0.4.2)
json (1.8.1, 1.7.7)
json_pure (1.8.1)
libxml-ruby (2.7.0, 2.6.0)
mime-types (2.3, 1.25.1)
mini_portile (0.6.1, 0.6.0)
minitest (5.4.0, 5.3.5, 4.3.2)
multi_json (1.10.1)
multi_test (0.1.1)
nap (0.8.0)
netrc (0.7.7)
nokogiri (1.5.6)
open4 (1.3.4)
power_assert (0.1.3)
psych (2.0.5, 2.0.0)
rack (1.5.2)
rack-protection (1.5.3)
rake (10.3.2, 0.9.6)
rdoc (4.1.1, 4.0.0)
rest-client (1.7.2, 1.6.7)
retriable (1.4.1, 1.3.3.1)
ruby-debug-ide (0.4.23.beta1)
rubygems-update (2.4.1)
rubyzip (1.1.6, 0.9.9)
run_loop (0.2.1)
sim_launcher (0.4.11)
sinatra (1.4.5)
slowhandcuke (0.0.3)
sqlite3 (1.3.9, 1.3.7)
test-unit (3.0.1, 2.5.5, 2.0.0.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (2.0.1, 1.4.1)
tzinfo (1.2.2)
xamarin-test-cloud (0.9.37, 0.9.35, 0.9.33)
xcodeproj (0.18.0, 0.17.0)