From bb56c41a49463ae30356f72b0de5e044d020a994 Mon Sep 17 00:00:00 2001 From: Thibaud Guillaume-Gentil Date: Thu, 25 Nov 2010 23:35:46 -0800 Subject: [PATCH] Using %|...| regex in Guardfile example --- README.rdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rdoc b/README.rdoc index 67f8a59..b7b4477 100644 --- a/README.rdoc +++ b/README.rdoc @@ -176,11 +176,11 @@ Looks at available guards code for more concrete example. Guardfile DSL consists of just two simple methods: guard & watch. Example: guard 'rspec', :version => 2 do - watch('^spec/(.*)_spec\.rb') - watch('^lib/(.*)\.rb') { |m| "spec/lib/#{m[1]}_spec.rb" } - watch('^spec/spec_helper\.rb') { "spec" } - watch('^spec/models/.*\.rb') { ["spec/models", "spec/acceptance"] } - watch('^spec/spec_helper\.rb') { `say hello` } + watch(%|^spec/(.*)_spec\.rb|) + watch(%|^lib/(.*)\.rb|) { |m| "spec/lib/#{m[1]}_spec.rb" } + watch(%|^spec/spec_helper\.rb|) { "spec" } + watch(%|^spec/models/.*\.rb|) { ["spec/models", "spec/acceptance"] } + watch(%|^spec/spec_helper\.rb|) { `say hello` } end - "guard" method allow to add a guard with an optional options hash