Permalink
Browse files

Adding spec:unit task only in dev and test

  • Loading branch information...
1 parent e8dc88d commit 02a5912190aa8161bf60fa4ff6949ea478fdad3c @manojlds committed Feb 25, 2014
Showing with 9 additions and 7 deletions.
  1. +9 −7 lib/tasks/spec.rake
View
@@ -1,11 +1,13 @@
-require 'rspec/rails'
+if !Rails.env.production?
+ require 'rspec/rails'
-namespace :spec do
- RSpec::Core::RakeTask.new(:unit) do |t|
- t.pattern = Dir['spec/*/**/*_spec.rb'].reject{ |f| f['/features'] }
- end
+ namespace :spec do
+ RSpec::Core::RakeTask.new(:unit) do |t|
+ t.pattern = Dir['spec/*/**/*_spec.rb'].reject{ |f| f['/features'] }
+ end
- RSpec::Core::RakeTask.new(:feature) do |t|
- t.pattern = 'spec/features/**/*_spec.rb'
+ RSpec::Core::RakeTask.new(:feature) do |t|
+ t.pattern = 'spec/features/**/*_spec.rb'
+ end
end
end

0 comments on commit 02a5912

Please sign in to comment.