Skip to content

Commit

Permalink
true and false should be converted properly
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy authored and cowboyd committed May 26, 2010
1 parent d2a49ee commit 8ecf5e6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions jsapi_spec.rb
Expand Up @@ -130,6 +130,24 @@ def ruby_time
evaljs('new Date()').should be_kind_of(Time)
end

it "translates ruby true to Javascript true" do
class_eval do
def bool
true
end
end
evaljs('o.bool === true').should == true
end

it "translates ruby false to Javascript false" do
class_eval do
def bool
false
end
end
evaljs('o.bool === false').should == true
end

it "can embed a ruby object into a context and call its methods" do
class_eval do
def say_hello(to)
Expand Down

0 comments on commit 8ecf5e6

Please sign in to comment.