Sha256: a5f72ccd0fb037918f14285d876c1d1179a059e073024947963354d2361d27c4

Contents?: true

Size: 1.41 KB

Versions: 8

Compression:

Stored size: 1.41 KB

Contents

require 'rubygems'
require 'bundler/setup'

require 'coveralls'
Coveralls.wear!

require 'digest/md5'
require 'spork'
require 'mock_redis'
require File.expand_path(File.dirname(__FILE__) + '/../../coffee_table/spec/lib/sample_class')
require File.expand_path(File.dirname(__FILE__) + '/../../coffee_table/spec/lib/sample_class_without_id')


Spork.prefork do
  require File.expand_path(File.dirname(__FILE__) + '/../../coffee_table/lib/coffee_table.rb')
  require File.expand_path(File.dirname(__FILE__) + '/../../coffee_table/lib/coffee_table/block_missing_error.rb')
  require File.expand_path(File.dirname(__FILE__) + '/../../coffee_table/lib/coffee_table/invalid_object_error.rb')
  require File.expand_path(File.dirname(__FILE__) + '/../../coffee_table/lib/coffee_table/key.rb')
end

Spork.each_run do
  RSpec.configure do |config|
    config.before(:each) {


      redis = double(:redis)
      Redis.stub(:new).and_return(MockRedis.new)
      CoffeeTable::Cache.new.expire_all

    }

    config.after(:each) {
    }
  end
end

def load_sample(filename)
  File.open(File.dirname(__FILE__) + "/samples/" + filename).map { |line| line}.join("\n")
end
def load_binary_sample(filename)
  File.open(File.dirname(__FILE__) + "/samples/" + filename, 'rb')
end

def md5_block(&block)
  block_source = RubyVM::InstructionSequence.disasm(block.to_proc).to_s.gsub(/\(\s*\d+\)/, "").gsub(/^== disasm.*?$/, "")
  Digest::MD5.hexdigest(block_source)
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coffee_table-0.2.11 spec/spec_helper.rb
coffee_table-0.2.10 spec/spec_helper.rb
coffee_table-0.2.9 spec/spec_helper.rb
coffee_table-0.2.8 spec/spec_helper.rb
coffee_table-0.2.7 spec/spec_helper.rb
coffee_table-0.2.6 spec/spec_helper.rb
coffee_table-0.2.5 spec/spec_helper.rb
coffee_table-0.2.4 spec/spec_helper.rb