lib/calabash-android/operations.rb in calabash-android-0.5.7 vs lib/calabash-android/operations.rb in calabash-android-0.5.8.pre1
- old
+ new
@@ -26,10 +26,21 @@
include Calabash::Android::EnvironmentHelpers
include Calabash::Android::TextHelpers
include Calabash::Android::TouchHelpers
include Calabash::Android::WaitHelpers
+ def self.extended(base)
+ if (class << base; included_modules.map(&:to_s).include?('Cucumber::RbSupport::RbWorld'); end)
+ unless instance_methods.include?(:embed)
+ original_embed = base.method(:embed)
+ define_method(:embed) do |*args|
+ original_embed.call(*args)
+ end
+ end
+ end
+ end
+
def current_activity
`#{default_device.adb_command} shell dumpsys window windows`.each_line.grep(/mFocusedApp.+[\.\/]([^.\s\/\}]+)/){$1}.first
end
def log(message)
@@ -1194,6 +1205,6 @@
default_device.make_http_request(options)
end
end
-end end
\ No newline at end of file
+end end