Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added spec task.

  • Loading branch information...
commit 9110e0d76f1738e8ab7de98691596e025d8c0463 1 parent d4d5068
@david authored
Showing with 17 additions and 2 deletions.
  1. +17 −2 Rakefile
View
19 Rakefile
@@ -1,5 +1,6 @@
require 'rubygems'
require 'rake/gempackagetask'
+require 'spec/rake/spectask'
GEM = "minibot"
VERSION = "0.0.1"
@@ -13,7 +14,7 @@ spec = Gem::Specification.new do |s|
s.version = VERSION
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
- s.extra_rdoc_files = ["README", "LICENSE"]
+ s.extra_rdoc_files = ["README", "LICENSE", "TODO"]
s.summary = SUMMARY
s.description = s.summary
s.author = AUTHOR
@@ -25,7 +26,7 @@ spec = Gem::Specification.new do |s|
s.require_path = 'lib'
s.autorequire = GEM
- s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,specs}/**/*")
+ s.files = %w(LICENSE README TODO Rakefile) + Dir.glob("{lib,specs}/**/*")
end
Rake::GemPackageTask.new(spec) do |pkg|
@@ -35,3 +36,17 @@ end
task :install => [:package] do
sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
end
+
+desc "Run all specs"
+Spec::Rake::SpecTask.new('spec') do |t|
+ t.spec_files = FileList['spec/**/*.rb']
+ t.spec_opts = %w{--format specdoc --color}
+end
+
+desc "Run all specs with rcov"
+Spec::Rake::SpecTask.new('spec:rcov') do |t|
+ t.spec_files = FileList['spec/**/*.rb']
+ t.rcov = true
+ t.rcov_opts = %w{--exclude spec --text-summary}
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.