spec/rtanque/point_spec.rb in rtanque-0.1.2 vs spec/rtanque/point_spec.rb in rtanque-0.1.3

- old
+ new

@@ -17,11 +17,11 @@ end context '#initialize' do it 'should be frozen' do a = described_class.new(10, 10, @arena) - expect(a.frozen?).to be_true + expect(a.frozen?).to be_truthy end it 'should not allow modification' do a = described_class.new(10, 10, @arena) expect { a.x = 1 }.to raise_exception(RUBY_VERSION >= '1.9' ? RuntimeError : TypeError) @@ -81,19 +81,19 @@ context '#==' do it 'is true when x & y are equal' do a = described_class.new(1, 1, @arena) b = described_class.new(1, 1, @arena) - expect(a == b).to be_true - expect(b == a).to be_true + expect(a == b).to be_truthy + expect(b == a).to be_truthy end it 'is not true when x & y are equal' do a = described_class.new(2, 1, @arena) b = described_class.new(1, 1, @arena) - expect(a == b).to be_false - expect(b == a).to be_false + expect(a == b).to be_falsey + expect(b == a).to be_falsey end end context '#move' do before do @@ -163,34 +163,34 @@ @a = described_class.new(5, 5, @arena) end it 'correctly detects equal points' do @b = @a.clone - expect(@a.within_radius?(@b, 1)).to be_true + expect(@a.within_radius?(@b, 1)).to be_truthy end it 'correctly detects point 1 to left' do @b = described_class.new(4, 5, @arena) - expect(@a.within_radius?(@b, 1)).to be_true + expect(@a.within_radius?(@b, 1)).to be_truthy end it 'correctly detects point 1 to right' do @b = described_class.new(6, 5, @arena) - expect(@a.within_radius?(@b, 1)).to be_true + expect(@a.within_radius?(@b, 1)).to be_truthy end it 'correctly detects point 1 above' do @b = described_class.new(5, 6, @arena) - expect(@a.within_radius?(@b, 1)).to be_true + expect(@a.within_radius?(@b, 1)).to be_truthy end it 'correctly detects point 1 below' do @b = described_class.new(5, 4, @arena) - expect(@a.within_radius?(@b, 1)).to be_true + expect(@a.within_radius?(@b, 1)).to be_truthy end it 'correctly detects point 1 NE' do @b = described_class.new(6, 6, @arena) - expect(@a.within_radius?(@b, 1)).to be_false + expect(@a.within_radius?(@b, 1)).to be_falsey end end end