Sha256: a53b6a4ba634b1188e1b7d889651be967d39d8d54248291aa3834cb44b6ce559
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require "rubygems" require "bundler" Bundler.setup(:default, :test) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) $LOAD_PATH.unshift(File.dirname(__FILE__)) require "rspec" require "dragonfly" require "fileutils" require "tempfile" require "webmock/rspec" require "pry" # Requires supporting files with custom matchers and macros, etc, Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } SAMPLES_DIR = Pathname.new(File.expand_path("../../samples", __FILE__)) RSpec.configure do |c| c.expect_with(:rspec) do |expectations| expectations.syntax = [:should, :expect] end c.mock_with(:rspec) do |mocks| mocks.syntax = [:should, :expect] end c.include ModelHelpers c.include RackHelpers end def todo raise "TODO" end require "logger" LOG_FILE = "tmp/test.log" FileUtils.rm_rf(LOG_FILE) Dragonfly.logger = Logger.new(LOG_FILE) RSpec.configure do |c| c.after(:each) do Dragonfly::App.destroy_apps end end def test_app(name = nil) app = Dragonfly::App.instance(name) app.datastore = Dragonfly::MemoryDataStore.new app.secret = "test secret" app end def test_imagemagick_app test_app.configure do analyser :image_properties, Dragonfly::ImageMagick::Analysers::ImageProperties.new end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dragonfly-1.4.1 | spec/spec_helper.rb |