Skip to content

Commit

Permalink
Fail if hooks contains include bug that will make test unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasmaturana committed Feb 21, 2013
1 parent 503414d commit 995daef
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ruby-gem/bin/calabash-android
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ unless defined? RbConfig.ruby
end
end


if File.exist? "features/support/app_life_cycle_hooks.rb"
content = IO.read("features/support/app_life_cycle_hooks.rb")
if content.include? "include Calabash::Android::Operations"
puts """
Fatal Error!
Your Calabash hooks are not compatible with this version of calabash-android.
Please remove the following line from 'features/support/app_life_cycle_hooks.rb'.
include Calabash::Android::Operations
"""

exit 1
end
end


require File.join(File.dirname(__FILE__), "calabash-android-helpers")
require File.join(File.dirname(__FILE__), "calabash-android-generate")
require File.join(File.dirname(__FILE__), "calabash-android-build")
Expand Down

0 comments on commit 995daef

Please sign in to comment.