README.md in guard-rspec-0.4.1 vs README.md in guard-rspec-0.4.2

- old
+ new

@@ -2,11 +2,11 @@ ============= RSpec guard allows to automatically & intelligently launch specs when files are modified. * Compatible with RSpec 1.x & RSpec 2.x (>= 2.4 needed for the notification feature) -* Tested on Ruby 1.8.7, 1.9.2, JRuby & Rubinius. +* Tested against Ruby 1.8.7, 1.9.2, REE, JRuby & Rubinius. Install ------- Please be sure to have [Guard](https://github.com/guard/guard) installed before continue. @@ -37,27 +37,27 @@ ### Standard RubyGem project ``` ruby guard 'rspec' do - watch(%r{^spec/.+_spec\.rb}) - watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" } - watch('spec/spec_helper.rb') { "spec" } + watch(%r{^spec/.+_spec\.rb$}) + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } + watch('spec/spec_helper.rb') { "spec" } end ``` ### Typical Rails app ``` ruby guard 'rspec' do - watch('spec/spec_helper.rb') { "spec" } - watch('config/routes.rb') { "spec/routing" } - watch('app/controllers/application_controller.rb') { "spec/controllers" } - watch(%r{^spec/.+_spec\.rb}) - watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" } - watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" } - watch(%r{^app/controllers/(.+)_(controller)\.rb}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } + watch('spec/spec_helper.rb') { "spec" } + watch('config/routes.rb') { "spec/routing" } + watch('app/controllers/application_controller.rb') { "spec/controllers" } + watch(%r{^spec/.+_spec\.rb$}) + watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } + watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } end ``` Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL. @@ -78,10 +78,18 @@ guard 'rspec', :cli => "--color --format nested --fail-fast --drb" do # ... end ``` +By default, Guard::RSpec will only look for spec files within `spec/` in your project root. You can configure Guard::RSpec to look in additional paths by using the `:spec_paths` option: + +``` ruby +guard 'rspec', :spec_paths => ["spec", "vendor/engines/reset/spec"] do + # ... +end +``` + Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are thus deprecated and have no effect anymore. ### List of available options: ``` ruby @@ -92,10 +100,11 @@ :notification => false # don't display Growl (or Libnotify) notification after the specs are done running, default: true :all_after_pass => false # don't run all specs after changed specs pass, default: true :all_on_start => false # don't run all the specs at startup, default: true :keep_failed => false # keep failed specs until them pass, default: true :run_all => { :cli => "-p" } # override any option when running all specs +:spec_paths => ["spec/"] # specify an array of paths that contain spec files ``` Notification ------------ @@ -142,7 +151,6 @@ Please run `rake spec:prepare_fixtures` once before launching specs. Author ------ -[Thibaud Guillaume-Gentil](https://github.com/thibaudgg) - +[Thibaud Guillaume-Gentil](https://github.com/thibaudgg) \ No newline at end of file