require 'rake' require 'spec/rake/spectask' require 'rake/rdoctask' desc "Default: run specs" task :default => :spec desc "Run all the specs for the notamock plugin." Spec::Rake::SpecTask.new do |t| t.spec_files = FileList['spec/**/*_spec.rb'] t.spec_opts = ['--colour'] t.rcov = true end desc "Generate documentation for the notamock plugin." Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = 'NotAMock' rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('MIT-LICENSE') rdoc.rdoc_files.include('TODO') rdoc.rdoc_files.include('lib/**/*.rb') end begin require 'jeweler' Jeweler::Tasks.new do |gemspec| gemspec.name = "not_a_mock" gemspec.summary = "A cleaner and DRYer alternative to mocking and stubbing with RSpec" gemspec.email = "pete@notahat.com" gemspec.homepage = "http://notahat.com/not_a_mock" gemspec.authors = ["Pete Yandell"] end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" end