Sha256: 40f8c6b9158dda577693e3824a7f889633ccd9d58c017128c8be09e93665efb9
Contents?: true
Size: 1.28 KB
Versions: 4
Compression:
Stored size: 1.28 KB
Contents
# require File.dirname(__FILE__) + '/../../../../spec/spec_helper' require 'rubygems' require 'activerecord' require 'spec' module Spec::Example::ExampleGroupMethods alias :context :describe end class Array def freq k=Hash.new(0) each {|e| k[e]+=1} k end end TEST_DATABASE_FILE = File.join(File.dirname(__FILE__), '..', 'test.sqlite3') File.unlink(TEST_DATABASE_FILE) if File.exist?(TEST_DATABASE_FILE) ActiveRecord::Base.establish_connection( "adapter" => "sqlite3", "database" => TEST_DATABASE_FILE ) RAILS_DEFAULT_LOGGER = Logger.new(File.join(File.dirname(__FILE__), "debug.log")) load(File.dirname(__FILE__) + '/schema.rb') $: << File.join(File.dirname(__FILE__), '..', 'lib') require File.join(File.dirname(__FILE__), '..', 'init') class TaggableModel < ActiveRecord::Base acts_as_taggable acts_as_taggable_on :languages acts_as_taggable_on :skills acts_as_taggable_on :needs, :offerings end class OtherTaggableModel < ActiveRecord::Base acts_as_taggable_on :tags, :languages acts_as_taggable_on :needs, :offerings end class InheritingTaggableModel < TaggableModel end class AlteredInheritingTaggableModel < TaggableModel acts_as_taggable_on :parts end class TaggableUser < ActiveRecord::Base acts_as_tagger end class UntaggableModel < ActiveRecord::Base end
Version data entries
4 entries across 4 versions & 2 rubygems