Sha256: 291851227f7946a12547e2c1985d5a9b2702463b49ece6de26e9618b2ea610ee
Contents?: true
Size: 1.47 KB
Versions: 2
Compression:
Stored size: 1.47 KB
Contents
# frozen_string_literal: true guard :rspec, cmd: 'bundle exec rspec' do require 'guard/rspec/dsl' dsl = Guard::RSpec::Dsl.new(self) # RSpec files watch(dsl.rspec.spec_helper) { dsl.rspec.spec_dir } watch(dsl.rspec.spec_files) # Ruby files dsl.watch_spec_files_for(dsl.ruby.lib_files) end # # TODO: refactor the following into a new version of guard-mutant # require 'mutant' # require 'dry/inflector' # require 'guard/compat/plugin' # # NOTE: :: is mandatory for inline guards # module ::Guard # class Mutant < Plugin # def initialize(options = {}) # opts = options.dup # # @my_option = opts.delete(:my_special_option) # super(opts) # important to call + avoid passing options Guard doesn't understand # end # # TODO: how would this make sense? # # def run_all; end # def run_on_modifications(paths) # inflector = Dry::Inflector.new # subjects = paths.map do |path| # match = path.match(%r{(?:spec|lib)\/(.*?)(?:_spec)?.rb}).captures.first # inflector.camelize match # end # succesful = ::Mutant::CLI.run(%w[--use rspec --fail-fast] + subjects) # throw :task_has_failed unless succesful # self # end # end # end # guard :mutant do # require 'guard/rspec/dsl' # dsl = Guard::RSpec::Dsl.new(self) # # RSpec files # # watch(dsl.rspec.spec_helper) { dsl.rspec.spec_dir } # watch(dsl.rspec.spec_files) # # Ruby files # dsl.watch_spec_files_for(dsl.ruby.lib_files) # end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mnogootex-2.0.0 | Guardfile |
mnogootex-1.1.0 | Guardfile |