Sha256: d76a994d6f4b0eaaafe013ce89ca4d7851290248b6b3fca01a2d71b2c01e32fa

Contents?: true

Size: 714 Bytes

Versions: 7

Compression:

Stored size: 714 Bytes

Contents

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

class <%= const.name %>Test < Test::Unit::TestCase

  # Preview fakes out a generator for testing
  Preview = Tap::Generator::Preview
  
  acts_as_tap_test 
  
  def test_<%= const.basename %>
    g = <%= const.const_name %>.new.extend Preview
    
    # check the files and directories
    assert_equal %w{
      <%= const.const_name.underscore %>_file.txt
    }, g.process
    
    # check the content as necessary
    assert_equal %q{
# A sample template file.
key: value
}, "\n" + g.preview['<%= const.const_name.underscore %>_file.txt']
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tap-gen-0.3.1 templates/tap/generator/generators/generator/test.erb
tap-gen-0.3.0 templates/tap/generator/generators/generator/test.erb
tap-gen-0.2.0 templates/tap/generator/generators/generator/test.erb
tap-gen-0.1.0 templates/tap/generator/generators/generator/test.erb
tap-gen-0.1.3 templates/tap/generator/generators/generator/test.erb
tap-gen-0.1.2 templates/tap/generator/generators/generator/test.erb
tap-gen-0.1.1 templates/tap/generator/generators/generator/test.erb