Sha256: 3460991a1dbfaa8e2f992ebd826cff50951867bb6f6a7ffdfb10b69fa5ad1695

Contents?: true

Size: 680 Bytes

Versions: 10

Compression:

Stored size: 680 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 %>
    task = <%= const.name %>.new :message => "goodnight"
    
    # a simple test
    assert_equal({:message  => 'goodnight'}, task.config)
    assert_equal "goodnight moon", task.process("moon")
    
    # a more complex test
    task.enq("moon")
    app.run
    
    assert_equal ["goodnight moon"], app.results(task)
    assert_audit_equal ExpAudit[[nil, "moon"], [task, "goodnight moon"]], app._results(task)[0]
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
bahuvrihi-tap-0.10.0 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.1 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.2 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.3 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.4 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.5 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.6 lib/tap/generator/generators/task/templates/test.erb
bahuvrihi-tap-0.10.7 lib/tap/generator/generators/task/templates/test.erb
tap-0.10.1 lib/tap/generator/generators/task/templates/test.erb
tap-0.10.0 lib/tap/generator/generators/task/templates/test.erb