Sha256: 3c92eefe68d97e8700381c1f73044855258c75a057faed89ebf890a7013885c7
Contents?: true
Size: 683 Bytes
Versions: 9
Compression:
Stored size: 683 Bytes
Contents
namespace :spec do namespace :fixture_builder do desc "Deletes the generated fixtures in spec/fixtures" task :clean do FileUtils.rm_f("tmp/fixture_builder.yml") FileUtils.rm_f(Dir.glob('spec/fixtures/*.yml')) puts "Automatically generated fixtures removed" end desc "Build the generated fixtures to spec/fixtures if dirty" task :build => :environment do ActiveRecord::Base.establish_connection('test') Dir.glob(File.join(Rails.root, '{spec,test}', '**', 'fixture_builder.rb')).each{|file| require(file)} end desc "Clean and rebuild the generated fixtures to spec/fixtures" task :rebuild => [:clean, :build] end end
Version data entries
9 entries across 9 versions & 1 rubygems