Guardfile in cli-forge-0.0.0 vs Guardfile in cli-forge-0.1.0
- old
+ new
@@ -1,12 +1,10 @@
# Touching any of these files should cause the entire test suite to reload.
GLOBAL_SPEC_FILES = [
".rspec",
%r{^spec/.*_helper\.rb$},
%r{^spec/common/.*\.rb$},
- "lib/cli_forge.rb",
- "lib/cli_forge/autoload_convention.rb",
]
def specs_for_path(path)
["spec/unit/#{path}_spec.rb", Dir["spec/unit/#{path}/**/*_spec.rb"]].flatten
end
@@ -24,12 +22,12 @@
watch(pattern) { :rspec }
end
end
guard "rspec", cli: "--drb --drb-port 2733" do
- GLOBAL_SPEC_FILES.each do |pattern|
- watch(pattern) { "spec" }
- end
+ watch("lib/cli_forge.rb") { "spec" }
+ watch("lib/cli_forge/autoload_convention.rb") { "spec" }
+ watch(%r{^spec/fixtures/.*\.rb$}) { "spec" }
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| specs_for_path(m[1]) }
end