Guardfile in muchkeys-0.0.1 vs Guardfile in muchkeys-0.3.3
- old
+ new
@@ -1,17 +1,12 @@
-guard :rspec, cmd: "bundle exec rspec" do
- require "guard/rspec/dsl"
- dsl = Guard::RSpec::Dsl.new(self)
+guard_options = {
+ cmd: "bundle exec rspec --color --format=doc",
+ all_after_pass: false,
+ all_after_fail: false,
+ all_on_start: false
+}
- # RSpec files
- rspec = dsl.rspec
- watch(rspec.spec_helper) { rspec.spec_dir }
- watch(rspec.spec_support) { rspec.spec_dir }
- watch(rspec.spec_files)
-
- # Ruby files
- ruby = dsl.ruby
- dsl.watch_spec_files_for(ruby.lib_files)
-
- # TODO: use the new rspec dsl here, but how?
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+guard :rspec, guard_options do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
end