Sha256: 8e28cb3574f1ba5d1ff6fa6a0417eab4bafcc884840d862c41814b42a2f1e7f2

Contents?: true

Size: 954 Bytes

Versions: 1

Compression:

Stored size: 954 Bytes

Contents

# encoding: utf-8
require "rubygems"
require "rspec"
require "rspec/autorun"
require "rails"
require "active_record"
require "carrierwave"
require "carrierwave/orm/activerecord"
require "carrierwave/processing/mini_magick"

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"..","lib"))

require "carrierwave-qiniu"

module Rails
  class <<self
    def root
      [File.expand_path(__FILE__).split('/')[0..-3].join('/'),"spec"].join("/")
    end
  end
end

ActiveRecord::Migration.verbose = false

# 测试的时候需要修改这个地方
::CarrierWave.configure do |config|
  config.storage             = :qiniu
  config.qiniu_access_key    = "your qiniu access_key"
  config.qiniu_secret_key    = 'your qiniu secret_key'
  config.qiniu_bucket        = "spec-test"
  config.qiniu_bucket_domain = "carrierwave-qiniu-example.aspxboy.com"
end

def load_file(fname)
  File.open([Rails.root,fname].join("/"))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carrierwave-qiniu-0.0.1 spec/spec_helper.rb