fixed test:units rake task

This commit is contained in:
albert
2010-03-18 18:29:41 -04:00
parent e46bfb3d76
commit 06a959a9fd
5 changed files with 136 additions and 27 deletions

View File

@@ -1,18 +1,18 @@
Factory.define(:tag) do |f|
f.name {Faker::Name.first_name.downcase}
f.post_count 0
f.category Tag.categories.general
f.category {Tag.categories.general}
f.related_tags ""
end
Factory.define(:artist_tag, :parent => :tag) do |f|
f.category Tag.categories.artist
f.category {Tag.categories.artist}
end
Factory.define(:copyright_tag, :parent => :tag) do |f|
f.category Tag.categories.copyright
f.category {Tag.categories.copyright}
end
Factory.define(:character_tag, :parent => :tag) do |f|
f.category Tag.categories.character
f.category {Tag.categories.character}
end

View File

@@ -1,9 +1,9 @@
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'shoulda'
ENV["RAILS_ENV"] = "test"
require 'factory_girl'
require 'shoulda'
require 'mocha'
require 'faker'
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'rails/test_help'
Dir[File.expand_path(File.dirname(__FILE__) + "/factories/*.rb")].each {|file| require file}