Sha256: d754f4d38b9523f412747bcdf238a2f4b21aa5d14c98d683c4f0aaccae1386d5

Contents?: true

Size: 890 Bytes

Versions: 10

Compression:

Stored size: 890 Bytes

Contents

require File.join(File.dirname(__FILE__), '<%= '../' * const.nesting_depth %>tap_test_helper.rb') 
require '<%= const.path %>'

class <%= const.name %>Test < Test::Unit::TestCase
  acts_as_tap_test 
  
  def test_<%= const.basename %>
    # Use assert_files to test file transform tasks.  The block  
    # recieves the method input files and compares the results 
    # to the method expected files.
  
    # Generated files are often placed in method output, as it
    # is cleaned up each test.  To keep output files, set the 
    # KEEP_OUTPUTS variable:
    #   % rake test keep_outputs=true
  
    t = <%= const.name %>.new 
    assert_files do |input_files|
      input_files.each do |source|
        target = method_root.filepath(:output, 'result.yml') 
        t.enq(source, target)
      end
    
      app.run
      app.results(t)
    end
  end
  
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
bahuvrihi-tap-0.10.5 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.10.6 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.10.7 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.10.8 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.11.0 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.11.1 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.11.2 lib/tap/generator/generators/file_task/templates/test.erb
bahuvrihi-tap-0.12.0 lib/tap/generator/generators/file_task/templates/test.erb
tap-0.11.0 lib/tap/generator/generators/file_task/templates/test.erb
tap-0.11.1 lib/tap/generator/generators/file_task/templates/test.erb