Sha256: 19d31954bf2c1718398c6f5732c0d5fd0168ebe85de2b44f89e982a73cb956c3
Contents?: true
Size: 868 Bytes
Versions: 9
Compression:
Stored size: 868 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/buildable.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/buildable.rb' require 'test/unit' class TestBuildable < Test::Unit::TestCase module M include Buildable extend self def m(n,*m) ; "#{n}{#{m}}"; end def t(n) ; "#{n}"; end alias :build :m end def test_01 str = M.build do html do head do title "Test" end body do i "Hello" build! :not t "Test" t "Hey" end end end r = "html{head{title{Test}}body{i{Hello}not{}TestHey}}" assert_equal( r, M.builder.to_s ) end end
Version data entries
9 entries across 9 versions & 1 rubygems