Method: TestMap::TestTask#define
- Defined in:
- lib/test_map/test_task.rb
#define ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/test_map/test_task.rb', line 43 def define namespace @name do desc 'Run tests for changed files' task :changes do out_file = "#{Dir.pwd}/.test-map.yml" args = defined?(Rails) ? ENV['TEST']&.split : ARGV[1..] test_files = Mapping.new(out_file).lookup(*args) # puts "Running tests #{test_files.join(' ')}" test_task.files = test_files test_task.call end end end |