public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
100644 18 lines (14 sloc) 0.486 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
namespace :test do
  
  task :setup do
    ENV["MACK_ENV"] = "test"
    Mack.reset_logger!
    Rake::Task["db:recreate"].invoke
    Mack::Database.dump_structure("development")
    Mack::Database.load_structure(File.join(Mack.root, "db", "development_schema_structure.sql"))
    
    # auto require factories:
    Dir.glob(File.join(Mack.root, "test", "factories", "**/*.rb")).each do |f|
      require f
    end
    
    run_factories(:init) if respond_to?(:run_factories)
  end
  
end