Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v1.6.0
Fetching contributors…

Cannot retrieve contributors at this time

file 17 lines (15 sloc) 0.491 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
guard :rspec, :cli => '--color --debugger' do
  # Run the corresponding spec (or all specs) when code changes.
  watch( %r{^lib/(.+)\.rb$} ) do |match|
    corresponding_spec = "spec/#{match[1]}_spec.rb"
    if File.file?( File.expand_path( "../#{corresponding_spec}", __FILE__ ))
      corresponding_spec
    else
      'spec'
    end
  end

  # Run a spec when it changes.
  watch %r{^spec/.+_spec\.rb$}

  # Run all specs when the bundle changes.
  watch( 'Gemfile.lock' ) { 'spec' }
end
Something went wrong with that request. Please try again.