Sha256: e99191cd9dfb09871c4f9672a960f43eed37877c1a0c685c8c22ca0f4da31eb4

Contents?: true

Size: 1.12 KB

Versions: 12

Compression:

Stored size: 1.12 KB

Contents

require 'rubygems'
require 'yaml'
require 'json'
require 'satoshi-unit'
require 'sequel'
Sequel.extension :migration

db_file = File.dirname(__FILE__) + "/config/txcatcher_test.db"
File.delete(db_file) if File.exists?(db_file)

require_relative '../lib/txcatcher/utils/hash_string_to_sym_keys'
require_relative '../lib/txcatcher/config'
require_relative '../lib/txcatcher/initializer'
require_relative '../lib/txcatcher/bitcoin_rpc'

include TxCatcher::Initializer
ConfigFile.set!(File.dirname(__FILE__) + "/config/config.yml")

read_config_file
connect_to_db
run_migrations if migrations_pending?
connect_to_rpc_node

require_relative '../lib/txcatcher/models/transaction'
require_relative '../lib/txcatcher/models/address'
require_relative '../lib/txcatcher/models/deposit'

def unhexlify(msg)
  msg.scan(/../).collect { |c| c.to_i(16).chr }.join
end 

RSpec.configure do |config|

  config.default_formatter = 'doc'

  config.before(:all) do
  end

  config.after(:all) do
  end

  config.before(:each) do
    TxCatcher::Transaction.select_all.delete
    TxCatcher::Deposit.select_all.delete
    TxCatcher::Address.select_all.delete
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
txcatcher-0.1.79 spec/spec_helper.rb
txcatcher-0.1.78 spec/spec_helper.rb
txcatcher-0.1.77 spec/spec_helper.rb
txcatcher-0.1.76 spec/spec_helper.rb
txcatcher-0.1.75 spec/spec_helper.rb
txcatcher-0.1.74 spec/spec_helper.rb
txcatcher-0.1.73 spec/spec_helper.rb
txcatcher-0.1.72 spec/spec_helper.rb
txcatcher-0.1.8 spec/spec_helper.rb
txcatcher-0.1.71 spec/spec_helper.rb
txcatcher-0.1.7 spec/spec_helper.rb
txcatcher-0.1.6 spec/spec_helper.rb