test/geometry/line.rb in geometry-6.5 vs test/geometry/line.rb in geometry-6.6

- old
+ new

@@ -153,11 +153,11 @@ it 'must not have an x-intercept for horizontal lines' do Geometry::PointSlopeLine.new([1,2], 0).intercept(:x).must_equal nil end it 'must have a y-intercept' do - subject.intercept.must_equal -1 + subject.intercept.must_equal(-1) end end describe Geometry::SlopeInterceptLine do subject { Geometry::SlopeInterceptLine.new 3, 2 } @@ -197,11 +197,11 @@ Geometry::SlopeInterceptLine.new(-Float::INFINITY, 2).vertical?.must_equal true Geometry::SlopeInterceptLine.new(1, 2).vertical?.must_equal false end it 'must have an x-intercept' do - subject.intercept(:x).must_equal -2/3 + subject.intercept(:x).must_equal(-2/3) end it 'must not have an x-intercept for horizontal lines' do Geometry::SlopeInterceptLine.new(0, 2).intercept(:x).must_equal nil end @@ -249,10 +249,10 @@ Geometry::TwoPointLine.new([1,2], [1,-3]).vertical?.must_equal true Geometry::TwoPointLine.new([1,2],[3,4]).vertical?.must_equal false end it 'must have an x-intercept' do - subject.intercept(:x).must_equal -1 + subject.intercept(:x).must_equal(-1) end it 'must not have an x-intercept for horizontal lines' do Geometry::TwoPointLine.new([1,2],[2,2]).intercept(:x).must_equal nil end