Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

I don't think this is the time, nor the place

  • Loading branch information...
commit 90e93a5ff74edb1841e14c10c8e12e65dbca97ee 1 parent 83c168a
@technoweenie authored
Showing with 2 additions and 8 deletions.
  1. +2 −8 tasks/stubs.rake
View
10 tasks/stubs.rake
@@ -1,10 +1,9 @@
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
@@ -12,15 +11,10 @@ namespace :stubs do
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
Please sign in to comment.
Something went wrong with that request. Please try again.