Skip to content
This repository
Browse code

Don't include rspec tasks in staging/production

  • Loading branch information...
commit aa7c8092ffdcf6828128631f08792ae392410482 1 parent 6c87cb1
Katrina Owen authored August 17, 2012
20  lib/generators/daemon_kit/rspec/templates/tasks/rspec.rake
... ...
@@ -1,11 +1,13 @@
1  
-require 'rspec'
2  
-require 'rspec/core/rake_task'
  1
+if ['test', 'development'].include?(DAEMON_ENV)
  2
+  require 'rspec'
  3
+  require 'rspec/core/rake_task'
3 4
 
4  
-desc "Run the specs under spec/"
5  
-RSpec::Core::RakeTask.new do |t|
6  
-  t.rspec_opts = ['--options', "spec/spec.opts"]
7  
-end
  5
+  desc "Run the specs under spec/"
  6
+  RSpec::Core::RakeTask.new do |t|
  7
+    t.rspec_opts = ['--options', "spec/spec.opts"]
  8
+  end
8 9
 
9  
-# Want other tests/tasks run by default?
10  
-# Add them to the list
11  
-task :default => [:spec] #, :features]
  10
+  # Want other tests/tasks run by default?
  11
+  # Add them to the list
  12
+  task :default => [:spec] #, :features]
  13
+end

0 notes on commit aa7c809

Please sign in to comment.
Something went wrong with that request. Please try again.