Skip to content

Instantly share code, notes, and snippets.

@sandro
sandro / w.rb
Last active December 14, 2015 15:49
require 'rb-fsevent'
unless ENV.has_key?('RSPEC_OPTIONS')
ENV['RSPEC_OPTIONS'] = '--fail-fast'
end
class Watcher
attr_accessor :now, :fsevent, :paths, :wip_enabled
REWRITE_REGEX = %r{(.*)(?:(app/)|(lib/))(.*)\.rb$}
@sandro
sandro / pass.rb
Created February 21, 2012 20:26
Preforking spec runner - like spork.
#!/usr/bin/env ruby
# Description
# Starts the rails environment in a long running process that forks a test
# runner. The test begins running immediately as the rails environment
# has already been loaded. Useful when running a single spec over and over.
# The program will exit when a change is detected
# in the Gemfile, or the db, config, lib and vendor directories.
#
@holman
holman / gemspec-usage.md
Created February 12, 2012 07:02
test/spec/mini

Just install this in your apps like so:

gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'