1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

add seeds for passing javascript objects back to ruby

This commit is contained in:
Charles Lowell 2009-10-22 21:45:41 -05:00
parent 68c968e109
commit c0d8d85b95
3 changed files with 19 additions and 0 deletions

View file

@ -41,6 +41,14 @@ describe "The Ruby Racer" do
eval("true").should be(true)
eval("false").should be(false)
end
it "can pass objects back to ruby" do
eval("({foo: 'bar', baz: 'bang'})").tap do |object|
object.should_not be_nil
object['foo'].should == 'bar'
object['baz'].should == 'bang'
end
end
end