spec/unit/assertion/inversion_spec.rb in assertion-0.1.0 vs spec/unit/assertion/inversion_spec.rb in assertion-0.2.0
- old
+ new
@@ -1,12 +1,12 @@
# encoding: utf-8
describe Assertion::Inversion do
- before { Adult = Assertion.about(:age) { age >= 18 } }
+ before { IsAdult = Assertion.about(:age) { age >= 18 } }
- let(:assertion) { Adult.new age: 21 }
+ let(:assertion) { IsAdult.new age: 21 }
subject(:inversion) { described_class.new(assertion) }
subject(:double_inversion) { described_class.new(inversion) }
describe ".new" do
@@ -38,11 +38,11 @@
describe "#message" do
context "for the truthy state" do
- it "is equal to wrong assertion" do
+ it "is equal to falsey assertion" do
expect(inversion.message(true)).to eql assertion.message(false)
end
it "works for double inversion" do
expect(double_inversion.message(true)).to eql assertion.message(true)
@@ -50,11 +50,11 @@
end # context
context "for the falsey state" do
- it "is equal to right assertion" do
+ it "is equal to truthy assertion" do
expect(inversion.message(false)).to eql assertion.message(true)
end
it "works for double inversion" do
expect(double_inversion.message(false)).to eql assertion.message(false)
@@ -82,8 +82,8 @@
expect(subject.messages).to contain_exactly assertion.message(true)
end
end # describe #call
- after { Object.send :remove_const, :Adult }
+ after { Object.send :remove_const, :IsAdult }
end # describe Assertion::Inversion