Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (58 sloc) 2.32 KB
require 'yaml'
require 'fileutils'
require 'rubygems'
require 'project/tasks'
require 'rake'
Dir[ 'lib/tasks/**/*' ].each{ |l| require l }
require 'jeweler' do |gem| = "autotest-diff"
gem.summary = %Q{Autotest style that only runs rspec examples within a spec that have changed.}
gem.description = %Q{
autotest-diff is an autotest style for rspec2 or rspec2 rails that tries
not to run specs you aren't working on.
It is obviously most helpful when you have slow-running specs, as is often
the case when working on a rails app, for instance.
When autotest decides to run multiple test files, autotest-diff behaves
just as rspec's style. When running only a single file, autotest-diff
compares the current file against a cached copy.
If there is no cached copy, all examples are run.
If there is a cached copy, only the examples that are modified are run.
This is done by passing --line_number flags to rspec.
autotest-diff has a very simple implementation, and depends on diff and
sed being in your $PATH. autotest-diff is not expected to work on windows.
} = ""
gem.homepage = ""
gem.authors = ["David J. Hamilton"]
if File.exists? 'Gemfile'
require 'bundler'
bundler = Bundler.load
bundler.dependencies_for( :runtime ).each do |dep|
gem.add_dependency, dep.requirement.to_s
bundler.dependencies_for( :development ).each do |dep|
gem.add_development_dependency, dep.requirement.to_s
# gem is a Gem::Specification... see for additional settings
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
desc "Run all specs."
task :spec do
# Jeweler messes up specs by polluting ENV
ENV.keys.grep( /git/i ).each{|k| ENV.delete k }
sh "rspec spec/autotest spec/integration"
require 'yard'
rescue LoadError
desc "Try (and fail) to run yardoc to get an error message."
task :yard do
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
Jump to Line
Something went wrong with that request. Please try again.