Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed for Padrino apps

  • Loading branch information...
commit 9cfe7f547be28e38ebff21ac344f0257aa60edd7 1 parent 0a20b6a
@hlascelles hlascelles authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/capybara-screenshot/saver.rb
View
2  lib/capybara-screenshot/saver.rb
@@ -17,7 +17,7 @@ def self.screen_shot_and_save_page(capybara, body)
#where should we save the screenshot to
if defined?(Rails)
screenshot_path = Rails.root.join "#{capybara.save_and_open_page_path}/#{file_base_name}.png"
- elsif defined?(Sinatra)
+ elsif defined?(Sinatra) and !settings.nil? # settings will be nill for Padrino apps
# Sinatra support, untested
screenshot_path = File.join(settings.root, "#{capybara.save_and_open_page_path}/#{file_base_name}.png")
else
Please sign in to comment.
Something went wrong with that request. Please try again.