Sha256: 958cbedd656ebd7376bc6bd4b96f38c322dec5820e92baceebb7d244ad646fe7

Contents?: true

Size: 1.04 KB

Versions: 11

Compression:

Stored size: 1.04 KB

Contents

begin
  require 'spec'
rescue LoadError
  require 'rubygems'
  gem 'rspec'
  require 'spec'
end
 
$:.unshift(File.join(File.dirname(__FILE__), '..'))
 
# Use the rubygem for local testing
require 'spec/stubs'
require 'rho/rho'
require 'rhom/rhom'

describe "rho initializer", :shared => true do

  attr_accessor :rhom, :rho

  before(:all) do
    FileUtils.mkdir_p('build')
  end

  after(:all) do
    FileUtils.rm_rf('build')
  end

  def array_print(arr)
    arr.each_with_index do |x,i|
      puts "arr[#{i}] = #{x.inspect}"
    end
  end
end

describe "rho db initializer", :shared => true do
  before(:each) do
    FileUtils.rm_rf('build/syncdbtest.sqlite')
    FileUtils.cp_r('spec/syncdbtest.sqlite','build/syncdbtest.sqlite')
    Object::const_set("SYNC_DB_FILE", "build/syncdbtest.sqlite") unless defined? SYNC_DB_FILE
    @rho = Rho::RHO.new(File.join(File.dirname(File.expand_path(__FILE__)), 'app_manifest.txt'))
    @rhom = Rhom::RhomObjectFactory.new
  end

  after(:each) do
    Rhom::RhomDbAdapter.close
    @rho = nil
    @rhom = nil
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rhodes-framework-1.0.0 spec/spec_helper.rb
rhodes-framework-1.0.1 spec/spec_helper.rb
rhodes-framework-1.0.3 spec/spec_helper.rb
rhodes-framework-1.0.2 spec/spec_helper.rb
rhodes-framework-1.0.4 spec/spec_helper.rb
rhodes-framework-1.0.5 spec/spec_helper.rb
rhodes-framework-1.0.10 spec/spec_helper.rb
rhodes-framework-1.0.8 spec/spec_helper.rb
rhodes-framework-1.0.9 spec/spec_helper.rb
rhodes-framework-1.0.7 spec/spec_helper.rb
rhodes-framework-1.0.6 spec/spec_helper.rb