lib/calabash/screenshot.rb in calabash-2.0.0.pre10 vs lib/calabash/screenshot.rb in calabash-2.0.0.pre11

- old
+ new

@@ -36,25 +36,25 @@ # test run. # # If the name given is an absolute path, then Calabash will save the # screenshot to the absolute directory given. # - # If the name given starts with ./ (e.g. `screenshot('./foo.png')`) then + # If the name given starts with ./ (e.g. `cal.screenshot('./foo.png')`) then # the filename will be saved relative to the current working directory. # # If the file specified by `name` has no extension then the filename will # default to name + '.png'. # # If the directories specified do not exist, Calabash will create them. # # @param [String] name Name of the screenshot. # @return [String] Path to the screenshot def screenshot(name=nil) - Device.default.screenshot(name) + Calabash::Internal.with_default_device {|device| device.screenshot(name)} end # Takes a screenshot and embeds it in the test report. This method is only - # available/useful when running in the context of cucumber. + # available/useful when running in the context of Cucumber. # @see Screenshot#screenshot def screenshot_embed(name=nil) path = screenshot(name) embed(path, 'image/png', name || File.basename(path)) end