Sha256: efc1b7657a8a639eed10ac6e71051e61fd08e05ee11012d2528ec23aaf7d218e

Contents?: true

Size: 888 Bytes

Versions: 5

Compression:

Stored size: 888 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 'spec'
require 'spec/autorun'
require 'logger'

Spec::Runner.configure do |config|
end

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

5 entries across 5 versions & 1 rubygems

Version Path
quebert-1.0.1 spec/spec_helper.rb
quebert-1.0.0 spec/spec_helper.rb
quebert-0.0.9 spec/spec_helper.rb
quebert-0.0.8 spec/spec_helper.rb
quebert-0.0.6 spec/spec_helper.rb