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!