Sha256: 8efdb1d901bbbaf6a3d92f011d4563097de9777cfd5ca7226df302376c5bdddd

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

require "rubygems"
require 'lib/jsont.rb'
require 'json'
describe "JsonT with a multi-dimensional array" do

  it "should transform" do
    JsonT.new(
      JSON.parse('{ "self": "<table>\n{$}\n</table>", "self[*]": "<tr>{$}</tr>\n", "self[*][*]": "<td>{$}</td>" }')
    ).transform(
      JSON.parse('[[1,2],[3,4]]')
    ).should == "<table>\n<tr><td>1</td><td>2</td></tr>\n<tr><td>3</td><td>4</td></tr>\n\n</table>"
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jsont-0.1.3 spec/multiarray.rb