Permalink
Browse files

Testing for Padrino constant (since Padrino is also "Sinatra", but do…

…esn't have its settings)
  • Loading branch information...
1 parent 9cfe7f5 commit 78b80ecb93452764ffbbbd41363674a57ba6c1a4 @hlascelles hlascelles committed Jan 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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) and !settings.nil? # settings will be nill for Padrino apps
+ elsif defined?(Sinatra) and !defined?(Padrino) # settings will be nil 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 78b80ec

Please sign in to comment.