Skip to content

Commit

Permalink
use guard-rspec 4.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
e2 committed Dec 12, 2014
1 parent b3865b9 commit 4445c7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 18 additions & 4 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
guard 'rspec', :version => 2 do
watch(%r{^spec/(.*)_spec.rb})
watch(%r{^lib/(.*).rb}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
guard :rspec, cmd: "bundle exec rspec" do
require "ostruct"

rspec = OpenStruct.new
rspec.spec_dir = "spec"
rspec.spec = ->(m) { "#{rspec.spec_dir}/#{m}_spec.rb" }
rspec.spec_helper = "#{rspec.spec_dir}/spec_helper.rb"

# matchers
rspec.spec_files = %r{^#{rspec.spec_dir}/.+_spec\.rb$}

# Ruby apps
ruby = OpenStruct.new
ruby.lib_files = %r{^(lib/.+)\.rb$}

watch(rspec.spec_files)
watch(rspec.spec_helper) { rspec.spec_dir }
watch(ruby.lib_files) { |m| rspec.spec.(m[1]) }
end
2 changes: 1 addition & 1 deletion guard-spork.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'bundler', '~> 1.0'
s.add_development_dependency 'rspec', '~> 3.1'
s.add_development_dependency 'transpec'
s.add_development_dependency 'guard-rspec', '~> 1.0'
s.add_development_dependency 'guard-rspec', '~> 4.4'
s.add_development_dependency 'pry', '~> 0.9.12.6'

s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.md]
Expand Down

0 comments on commit 4445c7b

Please sign in to comment.