spec/lib/xmlenc/builder/encrypted_key_spec.rb in xmlenc-0.2.1 vs spec/lib/xmlenc/builder/encrypted_key_spec.rb in xmlenc-0.3.0
- old
+ new
@@ -10,10 +10,11 @@
expect(subject).to respond_to :cipher_data
end
it "should check the presence of cipher data" do
subject.cipher_data = nil
- expect(subject).to have(1).error_on :cipher_data
+ expect(subject).to_not be_valid
+ expect(subject.errors[:cipher_data].size).to eq(1)
end
end
describe "optional fields" do
[:encryption_method, :key_info].each do |field|