Sha256: 71dc3ffd2ce1fd2675e7e7ca23d8834a70676005a1060f88e1b1065d218c1003

Contents?: true

Size: 1.36 KB

Versions: 7

Compression:

Stored size: 1.36 KB

Contents

# require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
require 'rubygems'
require 'active_record'
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"))

ActiveRecord::Base.silence do
  ActiveRecord::Migration.verbose = false
  load(File.dirname(__FILE__) + '/schema.rb')
end

$: << 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

7 entries across 7 versions & 1 rubygems

Version Path
acts-as-taggable-on-1.1.5 spec/spec_helper.rb
acts-as-taggable-on-1.1.4 spec/spec_helper.rb
acts-as-taggable-on-1.1.3 spec/spec_helper.rb
acts-as-taggable-on-1.1.2 spec/spec_helper.rb
acts-as-taggable-on-1.1.1 spec/spec_helper.rb
acts-as-taggable-on-1.1.0 spec/spec_helper.rb
acts-as-taggable-on-1.0.19 spec/spec_helper.rb