tests/object.fy in fancy-0.3.0 vs tests/object.fy in fancy-0.3.1
- old
+ new
@@ -99,12 +99,12 @@
'foo or: 'bar . should == true
'foo or: nil . should == true
}
it: "should be true for calling || with any value" for: '|| when: {
- ('foo || 'bar) should == true
- ('foo || nil) should == true
+ ('foo || 'bar) should == 'foo
+ ('foo || nil) should == 'foo
}
# end boolean messages
it: "should NOT be nil for non-nil values" for: 'nil? when: {
@@ -119,7 +119,15 @@
}
it: "should not be true" for: 'true? when: {
'foo true? should == nil
"hello, world" true? should == nil
+ }
+
+ it: "should return the correct value" for: 'returning:do: when: {
+ returning: [] do: |arr| {
+ arr << 1
+ arr << 2
+ arr << 3
+ } . should == [1,2,3]
}
}