lib/calabash.rb in calabash-1.9.9.pre2 vs lib/calabash.rb in calabash-1.9.9.pre3

- old
+ new

@@ -2,11 +2,10 @@ # iOS. It supports both native and hybrid app testing. # # It is developed and maintained by Xamarin and is released under the Eclipse # Public License. module Calabash - require 'calabash/patch/run_loop' require 'calabash/version' require 'calabash/environment' require 'calabash/logger' require 'calabash/color' require 'calabash/utility' @@ -60,11 +59,11 @@ # Given([...]) do # # Calabash will determine your platform and pick the Android page. # page(LoginPage).method # end # - # @param [Class] The page to instantiate + # @param [Class] page_class The page to instantiate # @return [Calabash::Page] An instance of the page class def page(page_class) if android? platform_module = Object.const_get(:Android) elsif ios? @@ -96,17 +95,20 @@ else raise "No such page defined '#{platform_module}::#{page_name}'" end end + # Is the app under test running on Android? def android? Android.const_defined?(:Device) && Device.default.is_a?(Android::Device) end + # Is the app under test running on iOS? def ios? IOS.const_defined?(:Device) && Device.default.is_a?(IOS::Device) end + # @!visibility private def self.new_embed_method!(method) EmbeddingContext.new_embed_method(method) end # @!visibility private