spec/tests/policy_spec.rb in attestor-1.0.0 vs spec/tests/policy_spec.rb in attestor-2.0.0
- old
+ new
@@ -49,57 +49,9 @@
expect(subject).to be_kind_of validator
end
end # describe .new
- describe "#valid?" do
-
- context "when #validate method fails" do
-
- before { allow(subject).to receive(:validate) { fail invalid } }
-
- it "returns false" do
- expect(subject.valid?).to eq false
- end
-
- end
-
- context "when #validate method passes" do
-
- before { allow(subject).to receive(:validate) { nil } }
-
- it "returns true" do
- expect(subject.valid?).to eq true
- end
-
- end
-
- end # describe #valid?
-
- describe "#invalid?" do
-
- context "when #validate method fails" do
-
- before { allow(subject).to receive(:validate) { fail invalid } }
-
- it "returns true" do
- expect(subject.invalid?).to eq true
- end
-
- end
-
- context "when #validate method passes" do
-
- before { allow(subject).to receive(:validate) { nil } }
-
- it "returns false" do
- expect(subject.invalid?).to eq false
- end
-
- end
-
- end # describe #invalid?
-
describe "#and" do
it "calls .and class factory method with self" do
expect(test_class).to receive(:and).with(subject, *others)
subject.and(*others)