Skip to content

Commit

Permalink
I don't think this is the time, nor the place
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Aug 25, 2008
1 parent 83c168a commit 90e93a5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tasks/stubs.rake
@@ -1,26 +1,20 @@
namespace :stubs do

desc "Load a ModelStubbing definition into the database. Specify Stub file with STUBS= and Definition with DEF="
task :load do
root = File.dirname(__FILE__) + '/../../../../'
require File.expand_path(root + "config/environment")

begin
require 'spec'
rescue
require 'rubygems'
require 'spec'
end
require 'model_stubbing'

# note to Rick: I've taken to using 'stubs.rb' instead of 'model_stubs.rb'
# because 'model_stubs' has a tab-completion collision with 'spec/models' and
# that drives me batty. Change the default to 'spec/model_stubs' if you want,
# you won't hurt my feelings.

require root + (ENV['STUBS'] || 'spec/stubs')

defn = (ENV['DEF'] || 'default').intern
ModelStubbing.definitions[defn].insert!
end

end

0 comments on commit 90e93a5

Please sign in to comment.