spec/lib/helper_spec.rb in dydx-0.1.25 vs spec/lib/helper_spec.rb in dydx-0.1.28
- old
+ new
@@ -23,9 +23,14 @@
it{ expect((:x * :y).is_multiple_of(:x)).to eq(:y) }
it{ expect((:x * :y).is_multiple_of(:y)).to eq(:x) }
it{ expect((:x * :y).is_multiple_of(:z)).to be_false }
end
+ context '#like_term?' do
+ it{ expect(x.like_term?(x)).to be_true }
+ it{ expect((2 * x).like_term?((3 * x))).to be_true }
+ end
+
context '#combinable?' do
it{ expect(:x.combinable?(:x, :+)).to be_true }
it{ expect(:x.combinable?(2 * :x, :+)).to be_true }
it{ expect((2 * :x).combinable?(:x, :+)).to be_true }
it{ expect((2 * :x).combinable?(2 * :x, :+)).to be_true }