Sha256: 2b8e02f65a58373fef081ec6f51fd273a35161594f5a4a55395719451362a6f7

Contents?: true

Size: 758 Bytes

Versions: 1

Compression:

Stored size: 758 Bytes

Contents

require 'bundler'
Bundler.require(:default, :test)

require 'rspec/core'
require './lib/groovy'

# Groonga::Logger.path = "/tmp/groonga.log"
# Groonga::Logger.max_level = :debug

RSpec.configure do |config|
  config.before(:each) do
    # Groonga::Context.default = nil
  end
  config.after(:suite) do
    FileUtils.rm_rf('tmp')
  end
end

class TestCategory
  include Groovy::Model
end

class TestProduct
  include Groovy::Model
end

def load_schema!(context_name)
  TestCategory.load_schema context: context_name do |t|
    t.string :name
  end

  TestProduct.load_schema context: context_name do |t|
    t.one :test_category
    t.boolean :visible
    t.string  :name
    t.integer :price
    t.string  :tag_list
    t.timestamps
  end
end

# load_schema!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
groovy-0.7.1 spec/spec_helper.rb