Sha256: a4c3e08e98d29b74d5b61dd7c406824327c2f7dd0aa161f41659a94fa206adc2

Contents?: true

Size: 317 Bytes

Versions: 1

Compression:

Stored size: 317 Bytes

Contents

require "rubygems"
require 'lib/jsont.rb'
require 'json'
describe "JsonT with procs" do
  
  it "should transform" do
    JsonT.new(
      {'self' => '<div>{$.test}</div>', 'test' => Proc.new{|t, opts| t['x']+t['y']}}
    ).transform(
      {'test' => {'x' => 1, 'y' => 2}}
    ).should == '<div>3</div>'
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jsont-0.1.3 spec/proc.rb