Sha256: 6b625fff7fd11a9b551bd7642d544b2036782159d5a96bdac6f6286e666b814f
Contents?: true
Size: 709 Bytes
Versions: 3
Compression:
Stored size: 709 Bytes
Contents
require File.expand_path('<%= '../' * const.nesting_depth %>../test_helper', __FILE__) require '<%= const.relative_path %>' require 'tap/generator/preview' 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
3 entries across 3 versions & 1 rubygems