Sha256: 1358dc8e88d10e9804ca66663cde292e6486dd67f17a4bb4999a36b06a815ad1
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib') require 'dragonfly' require 'spec/expectations' require 'test/unit/assertions' require File.dirname(__FILE__) + '/../../spec/image_matchers.rb' # A hack as system calls weren't using my path extra_paths = %w(/opt/local/bin) ENV['PATH'] ||= '' ENV['PATH'] += ':' + extra_paths.join(':') # A hash of <name for reference> => <dragonfly uid> pairs TEMP_FILES = {} Dragonfly::App[:images].configure_with(Dragonfly::Config::RMagickImages) Dragonfly::App[:files].configure do |c| c.register_analyser(Dragonfly::Analysis::FileCommandAnalyser) c.register_encoder(Dragonfly::Encoding::TransparentEncoder) end SAMPLE_IMAGE_PATH = File.dirname(__FILE__)+'/../../samples/beach.png' Before do # Remove temporary images TEMP_FILES.each do |name, uid| $app.datastore.destroy(uid) TEMP_FILES.delete(name) end end module MyHelpers def make_request(name, *args) request = Rack::MockRequest.new($app) url = $app.url_for(TEMP_FILES[name], *args) @response = request.get(url) end end World(MyHelpers)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dragonfly-0.6.2 | features/support/env.rb |
dragonfly-0.6.1 | features/support/env.rb |
dragonfly-0.6.0 | features/support/env.rb |