test/model/spec_variable.rb in pione-0.1.4 vs test/model/spec_variable.rb in pione-0.2.0
- old
+ new
@@ -17,66 +17,66 @@
describe 'pione method ==' do
it 'should true' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
vtable.set(@b, PioneInteger.new(1).to_seq)
- BinaryOperator.new("==", @a, @b).eval(vtable).should == PioneBoolean.new(true).to_seq
+ Message.new("==", @a, @b).eval(vtable).should == PioneBoolean.new(true).to_seq
end
it 'should false' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
vtable.set(@b, PioneInteger.new(2).to_seq)
- BinaryOperator.new("==", @a, @b).eval(vtable).should == PioneBoolean.new(false).to_seq
+ Message.new("==", @a, @b).eval(vtable).should == PioneBoolean.new(false).to_seq
end
it 'should raise unbound variable error' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
should.raise(UnboundVariableError) do
- BinaryOperator.new("==", @a, @b).eval(vtable)
+ Message.new("==", @a, @b).eval(vtable)
end
end
it 'should raise type error' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
vtable.set(@b, PioneFloat.new(1.0).to_seq)
should.raise(MethodNotFound) do
- BinaryOperator.new("==", @a, @b).eval(vtable)
+ Message.new("==", @a, @b).eval(vtable)
end
end
end
describe 'pione method !=' do
it 'should true' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
vtable.set(@b, PioneInteger.new(2).to_seq)
- BinaryOperator.new("!=", @a, @b).eval(vtable).should == PioneBoolean.new(true).to_seq
+ Message.new("!=", @a, @b).eval(vtable).should == PioneBoolean.new(true).to_seq
end
it 'should false' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
vtable.set(@b, PioneInteger.new(1).to_seq)
- BinaryOperator.new("!=", @a, @b).eval(vtable).should == PioneBoolean.new(false).to_seq
+ Message.new("!=", @a, @b).eval(vtable).should == PioneBoolean.new(false).to_seq
end
it 'should raise unbound variable error' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
should.raise(UnboundVariableError) do
- BinaryOperator.new("!=", @a, @b).eval(vtable)
+ Message.new("!=", @a, @b).eval(vtable)
end
end
it 'should raise type error' do
vtable = VariableTable.new
vtable.set(@a, PioneInteger.new(1).to_seq)
vtable.set(@b, PioneFloat.new(1.0).to_seq)
should.raise(MethodNotFound) do
- BinaryOperator.new("!=", @a, @b).eval(vtable)
+ Message.new("!=", @a, @b).eval(vtable)
end
end
end
end