Sha256: 2d09d6354ddbdbaa0ff64b54055ca3b840ea40ccef02b86934bf620f2a3878b7
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
class WkhtmltopdfLocationTest < ActiveSupport::TestCase setup do @saved_config = WickedPdf.config WickedPdf.config = {} end teardown do WickedPdf.config = @saved_config end test 'should correctly locate wkhtmltopdf without bundler' do bundler_module = Bundler Object.send(:remove_const, :Bundler) assert_nothing_raised do WickedPdf.new end Object.const_set(:Bundler, bundler_module) end test 'should correctly locate wkhtmltopdf with bundler' do assert_nothing_raised do WickedPdf.new end end class LocationNonWritableTest < ActiveSupport::TestCase setup do @saved_config = WickedPdf.config WickedPdf.config = {} @old_home = ENV['HOME'] ENV['HOME'] = '/not/a/writable/directory' end teardown do WickedPdf.config = @saved_config ENV['HOME'] = @old_home end test 'should correctly locate wkhtmltopdf with bundler while HOME is set to a non-writable directory' do assert_nothing_raised do WickedPdf.new end end end end
Version data entries
10 entries across 10 versions & 2 rubygems