Skip to content

Commit

Permalink
fixing capybara root when Rails is not defined
Browse files Browse the repository at this point in the history
Effective cherry-pick of commit from mattheworiordan@28dde83
  • Loading branch information
mattheworiordan committed Mar 29, 2016
1 parent 57dc7d6 commit bd9967b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara-screenshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def self.filename_prefix_for(test_type, test)
end

def self.capybara_root
@capybara_root ||= if defined?(::Rails)
@capybara_root ||= if defined?(::Rails) && Rails.root.present?
::Rails.root.join capybara_tmp_path
elsif defined?(Padrino)
File.expand_path(capybara_tmp_path, Padrino.root)
Expand Down

0 comments on commit bd9967b

Please sign in to comment.