Browse files

Fixed for Padrino apps

  • Loading branch information...
1 parent 0a20b6a commit 9cfe7f547be28e38ebff21ac344f0257aa60edd7 @hlascelles hlascelles committed Jan 27, 2012
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

0 comments on commit 9cfe7f5

Please sign in to comment.