GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Build your fixtures in Ruby.
Homepage: http://errtheblog.com/posts/61-fixin-fixtures
Clone URL: git://github.com/defunkt/fixture_scenarios_builder.git
Fix up rake task to use spec/fixtures over test/fixtures if it exists
nick (author)
Tue Apr 22 10:33:36 -0700 2008
commit  4be4b12d90ed23147999515938ef86100e19a702
tree    fb97867bef59e8f6603297364de63fa743481bc2
parent  72da47b3ccfe64dd5d7cbb3f2086e767a0d130cf
...
4
5
6
7
 
 
8
9
10
...
4
5
6
 
7
8
9
10
11
0
@@ -4,7 +4,8 @@ namespace :db do
0
     task :build => :environment do
0
       require 'active_record/fixtures'
0
       require 'fixture_scenarios'
0
- if File.exists? scenarios_rb = File.join(RAILS_ROOT, 'test', 'fixtures', 'scenarios.rb')
0
+ test_or_spec_dir = File.exists?(File.join(RAILS_ROOT, 'spec')) ? 'spec' : 'test'
0
+ if File.exists? scenarios_rb = File.join(RAILS_ROOT, test_or_spec_dir, 'fixtures', 'scenarios.rb')
0
         require scenarios_rb
0
       end
0
     end

Comments

    No one has commented yet.