lib/tasks/rspec.rake in radiantcms-couchrest_model-0.1.4 vs lib/tasks/rspec.rake in radiantcms-couchrest_model-0.1.5
- old
+ new
@@ -17,11 +17,11 @@
task :default => :spec
task :stats => "spec:statsetup"
desc 'Run all specs in spec directory (excluding plugin & generator specs)'
task :spec => spec_prereq do
- errors = %w(spec:integration spec:models spec:controllers spec:views spec:helpers spec:lib spec:generators spec:extensions).collect do |task|
+ errors = %w(spec:integration spec:models spec:controllers spec:views spec:helpers spec:lib spec:generators).collect do |task|
begin
puts %{\nRunning #{task.gsub('spec:', '').titlecase} Spec Task}
Rake::Task[task].invoke
nil
rescue => e
@@ -69,20 +69,20 @@
Spec::Rake::SpecTask.new(sub => spec_prereq) do |t|
t.spec_opts = ['--options', "\"#{RADIANT_ROOT}/spec/spec.opts\""]
t.spec_files = FileList["#{RADIANT_ROOT}/spec/#{sub}/**/*_spec.rb"]
end
end
- Cucumber::Rake::Task.new(:integration)# do |t|
- # t.cucumber_opts = ["--format","progress"]
- # t.feature_pattern = "#{RADIANT_ROOT}/features/**/*.feature"
- # end
+ Cucumber::Rake::Task.new(:integration) do |t|
+ t.cucumber_opts = ["--format","progress"]
+ t.feature_pattern = "#{RADIANT_ROOT}/features/**/*.feature" if t.respond_to?(:feature_pattern=)
+ end
desc 'Run all specs in spec/generators directory'
task :generators => spec_prereq do
errors = ['spec:generators:extension_controller', 'spec:generators:extension_mailer',
'spec:generators:extension_migration', 'spec:generators:extension_model',
- 'spec:generators:extension', 'spec:generators:instance'].collect do |task|
+ 'spec:generators:extension'].collect do |task|
begin
Rake::Task[task].invoke
nil
rescue => e
task
@@ -90,11 +90,11 @@
end.compact
abort "Errors running #{errors.to_sentence}!" if errors.any?
end
namespace :generators do
- [:extension_controller, :extension_mailer, :extension_migration, :extension_model, :extension, :instance].each do |generator|
+ [:extension_controller, :extension_mailer, :extension_migration, :extension_model, :extension].each do |generator|
desc "Run the spec at spec/geneartors/#{generator}_generator_spec.rb"
Spec::Rake::SpecTask.new(generator => spec_prereq) do |t|
t.spec_opts = ['--options', "\"#{RADIANT_ROOT}/spec/spec.opts\""]
t.spec_files = [File.join(RADIANT_ROOT, "spec/generators/#{generator}_generator_spec.rb")]
end
@@ -192,10 +192,10 @@
%w(integration models controllers views helpers lib generators).each do |t|
task t => :spec_prereq
end
namespace :generators do
- [:extension_controller, :extension_mailer, :extension_migration, :extension_model, :extension, :instance].each do |t|
+ [:extension_controller, :extension_mailer, :extension_migration, :extension_model, :extension].each do |t|
task t => :spec_prereq
end
end
task :plugins => :spec_prereq
\ No newline at end of file