Sha256: 9ebf04b54ccedaa772bbaf014eb7fe845d3336d7d2be2f13df8c80ec15bda6a3

Contents?: true

Size: 836 Bytes

Versions: 12

Compression:

Stored size: 836 Bytes

Contents

require 'rubygems'
require 'bundler/setup'

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

require 'quebert'
require 'quebert/logging'
require 'logger'

include Quebert
Quebert.config.logger = Logger.new('/dev/null') # Shhh...

def clean_file(path, contents=nil, &block)
  FileUtils.remove_entry(path) if File.exists?(path)
  FileUtils.mkdir_p(File.dirname(path))
  begin
    File.open(path, 'w'){|f| f.write(contents == :empty ? nil : contents) } unless contents.nil?
    block.call
  ensure
    FileUtils.remove_entry(path) if File.exists?(path) and path != './'  # Yeah! This has happened before :(
  end
end

Dir[File.join(File.dirname(__FILE__), 'support/*.rb')].each {|file| require file }

Quebert.serializers.register 'ActiveRecord::Base', Serializer::ActiveRecord

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
quebert-2.0.2 spec/spec_helper.rb
quebert-2.0.1 spec/spec_helper.rb
quebert-2.0.0 spec/spec_helper.rb
quebert-1.12.0 spec/spec_helper.rb
quebert-1.11.0 spec/spec_helper.rb
quebert-1.0.9 spec/spec_helper.rb
quebert-1.0.8 spec/spec_helper.rb
quebert-1.0.7 spec/spec_helper.rb
quebert-1.0.6 spec/spec_helper.rb
quebert-1.0.5 spec/spec_helper.rb
quebert-1.0.4 spec/spec_helper.rb
quebert-1.0.2 spec/spec_helper.rb