require 'rake' require 'spec/rake/spectask' require 'rake/rdoctask' desc 'Default: run unit tests.' task :default => :spec desc 'Test the magic_enum plugin.' Spec::Rake::SpecTask.new(:spec) do |t| t.libs << 'lib' t.pattern = 'spec/*_spec.rb' end desc 'Generate documentation for the magic_enum plugin.' Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = 'MagicEnum' rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README') rdoc.rdoc_files.include('lib/**/*.rb') end