Sha256: 9912dfe4d34063ea5c4892ad8f6e8442af5c658353e25d5823e051d1ea2ce159

Contents?: true

Size: 802 Bytes

Versions: 8

Compression:

Stored size: 802 Bytes

Contents

def rspec_guard(options = {}, &block)
  options = {
    version: 2,
    notification: false
  }.merge(options)

  guard 'rspec', options, &block
end

rspec_guard spec_paths: %w{spec/draper spec/generators} do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }
end

rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'development'} do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }
end

rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'production'} do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
draper-4.0.4 Guardfile
draper-4.0.3 Guardfile
draper-4.0.2 Guardfile
draper-4.0.1 Guardfile
draper-4.0.0 Guardfile
draper-3.1.0 Guardfile
draper-3.0.1 Guardfile
draper-3.0.0 Guardfile