Sha256: b757d5f60b3aa57b0a7150dabd9b52d095a9ed8b3940407b1796d20cfa3f87e4
Contents?: true
Size: 822 Bytes
Versions: 2
Compression:
Stored size: 822 Bytes
Contents
require 'bundler/setup' require 'logger' require 'json_spec' require 'fakefs/spec_helpers' require 'avro_turf' Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } module Helpers def define_schema(path, content) File.open(File.join("spec/schemas", path), "w") do |f| f.write(content) end end def store_cache(path, hash) File.write(File.join("spec/cache", path), JSON.generate(hash)) end def load_cache(path) JSON.parse(File.read(File.join("spec/cache", path))) end end # gem `fakefs` does not support flock for the file, and require patch # https://github.com/fakefs/fakefs/issues/433 module FakeFS class File < StringIO def flock(*) true end end end RSpec.configure do |config| config.include FakeFS::SpecHelpers config.include Helpers end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
avro_turf-1.9.0 | spec/spec_helper.rb |
avro_turf-1.8.0 | spec/spec_helper.rb |