spec/piglet/field/reference_spec.rb in piglet-0.2.0 vs spec/piglet/field/reference_spec.rb in piglet-0.2.2
- old
+ new
@@ -73,11 +73,13 @@
[:==, :>, :<, :>=, :<=, :%, :+, :-, :*, :/].each do |op|
it "supports #{op} on a field" do
@field1.send(op, @field2).to_s.should eql("field1 #{op} field2")
end
- it "supports #{op} on an expression" do
- (@field1 + (@field1.send(op, @field2))).to_s.should eql("field1 + (field1 #{op} field2)")
+ if op != :+ # + is already covered in all other iterations, and it parenthesizes differently
+ it "supports #{op} on an expression" do
+ (@field1 + (@field1.send(op, @field2))).to_s.should eql("field1 + (field1 #{op} field2)")
+ end
end
end
it 'supports != through #ne on a field' do
@field1.ne(@field2).to_s.should eql("field1 != field2")
\ No newline at end of file