Sha256: 539135b59da437dacda0bc8388072d6e16128ed75436f6b825d5d40ee7ac91eb

Contents?: true

Size: 511 Bytes

Versions: 7

Compression:

Stored size: 511 Bytes

Contents

require "spec_helper"
require "tagen/erb"
require "tagen/core"

describe ERB do
	describe "#result" do
		before :all do
			@erb = ERB.new("<%=a%>")
		end

		it "runs ok" do
			a = 1
			@erb.result(binding).should == "1"
		end

		it "runs ok with local " do
			@erb.result(nil, a: 2).should == "2"
		end

		it "support string as key in locals" do
			@erb.result(nil, "a" => 2).should == "2"
		end

		#it "support OpenOption" do
			#o = OpenOption.new(a: 1)
			#@erb.result(nil, o).should == '1'
		#end

	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tagen-1.1.7 spec/tagen/erb_spec.rb
tagen-1.1.6 spec/tagen/erb_spec.rb
tagen-1.1.5 spec/tagen/erb_spec.rb
tagen-1.1.4 spec/tagen/erb_spec.rb
tagen-1.1.3 spec/tagen/erb_spec.rb
tagen-1.1.2 spec/tagen/erb_spec.rb
tagen-1.1.1 spec/tagen/erb_spec.rb