Sha256: dd8e02aa94a6ff0ee50748dbbeb15311e16261c38c60ec08134792acca055b4c

Contents?: true

Size: 868 Bytes

Versions: 21

Compression:

Stored size: 868 Bytes

Contents

#!/usr/bin/env ruby

require 'test/unit'
currentPath = File.dirname(__FILE__)
require File.join( currentPath, '../lib/masterview' )

class TestParser < Test::Unit::TestCase
  CurrentPath = File.dirname(__FILE__)
  MasterViewHTMLFile = File.join(CurrentPath, '../examples/product.html')
  TmpOutputDir = File.join(CurrentPath, '../tmp/views')

  def setup
    FileUtils.remove_dir(TmpOutputDir, true)
  end

  def test_parser_run
    MasterView::Parser.parse_file( MasterViewHTMLFile, TmpOutputDir )
    assert File.exist?(TmpOutputDir+'/layouts/product.rhtml')
    assert File.exist?(TmpOutputDir+'/product/_form.rhtml')
    assert File.exist?(TmpOutputDir+'/product/edit.rhtml')
    assert File.exist?(TmpOutputDir+'/product/list.rhtml')
    assert File.exist?(TmpOutputDir+'/product/new.rhtml')
    assert File.exist?(TmpOutputDir+'/product/show.rhtml')
  end
end


Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
masterview-0.0.11 test/run_parser_test.rb
masterview-0.0.13 test/run_parser_test.rb
masterview-0.0.15 test/run_parser_test.rb
masterview-0.0.12 test/run_parser_test.rb
masterview-0.0.14 test/run_parser_test.rb
masterview-0.0.2 test/run_parser_test.rb
masterview-0.0.17 test/run_parser_test.rb
masterview-0.0.16 test/run_parser_test.rb
masterview-0.0.10 test/run_parser_test.rb
masterview-0.1.5 test/run_parser_test.rb
masterview-0.0.7 test/run_parser_test.rb
masterview-0.0.8 test/run_parser_test.rb
masterview-0.1.0 test/run_parser_test.rb
masterview-0.1.1 test/run_parser_test.rb
masterview-0.1.2 test/run_parser_test.rb
masterview-0.1.3 test/run_parser_test.rb
masterview-0.0.9 test/run_parser_test.rb
masterview_parser-0.0.6 test/run_parser_test.rb
masterview_parser-0.0.5 test/run_parser_test.rb
masterview_parser-0.0.3 test/run_parser_test.rb