Sha256: a3bcd5e3f4db0266bd9a89bf3002223eded7c1ea206460d5d2ffb34d4784d5de

Contents?: true

Size: 661 Bytes

Versions: 4

Compression:

Stored size: 661 Bytes

Contents

scope(groups: %w(specs))

directories %w(spec lib)

group :specs, halt_on_fail: true do
  guard :rspec, cmd: "bundle exec rspec", failed_mode: :keep do
    require "guard/rspec/dsl"
    dsl = Guard::RSpec::Dsl.new(self)

    # 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)
  end

  guard :rubocop, all_on_start: false, cli: "--rails" do
    watch(%r{.+\.rb$}) { |m| m[0] }
    watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
  end
end

# vim: ft=ruby

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jkf-0.5.0 Guardfile
jkf-0.4.3 Guardfile
jkf-0.4.2 Guardfile
jkf-0.4.1 Guardfile