Sha256: 945f9f0b1567ccce0cd072380d026e195e11c5914cedc994e37ed7216309af60

Contents?: true

Size: 666 Bytes

Versions: 2

Compression:

Stored size: 666 Bytes

Contents

require File.join(File.expand_path('../../test_helper', __FILE__))
require 'digest/sha1'
require 'fileutils'

RESULT = <<EOF
local function do_something()
  return 15;
end
return do_something()
EOF

class Wolverine
  class ScriptTemplatingTest < MiniTest::Unit::TestCase

    def setup
      base = Pathname.new('test/wolverine/lua')
      Wolverine.config.script_path = base
    end

    def teardown
      Wolverine.config.instrumentation = proc{}
    end

    def script
      @script ||= Wolverine::Script.new('test/wolverine/lua/outer.lua')
    end

    def test_templating
      assert_equal script.instance_variable_get('@content'), RESULT
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wolverine-0.3.5 test/wolverine/script_templating_test.rb
wolverine-0.3.4 test/wolverine/script_templating_test.rb