app_generators/newgem_simple/templates/Rakefile in newgem-0.25.0 vs app_generators/newgem_simple/templates/Rakefile in newgem-0.27.0

- old
+ new

@@ -1,9 +1,10 @@ require 'rubygems' require 'rake/gempackagetask' require 'rubygems/specification' require 'date' +require 'spec/rake/spectask' GEM = "<%= name %>" GEM_VERSION = "0.0.1" AUTHOR = "Your Name" EMAIL = "Your Email" @@ -25,11 +26,20 @@ # Uncomment this to add a dependency # s.add_dependency "foo" s.require_path = 'lib' s.autorequire = GEM - s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*") + s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/*") end + +task :default => :spec + +desc "Run specs" +Spec::Rake::SpecTask.new do |t| + t.spec_files = FileList['spec/**/*_spec.rb'] + t.spec_opts = %w(-fs --color) +end + Rake::GemPackageTask.new(spec) do |pkg| pkg.gem_spec = spec end \ No newline at end of file