Commit 13a2e1f

mo <mo.khan@gmail.com>
2019-04-21 18:31:04
use rspec be_ matcher
1 parent 5bea114
Changed files (1)
spec
spec/xml/kit/key_pair_spec.rb
@@ -15,8 +15,8 @@ RSpec.describe Xml::Kit::KeyPair do
     subject { described_class.new(certificate.to_pem, key.export, '', :signing) }
 
     specify { expect { subject }.not_to raise_error }
-    specify { expect(subject.for?(:signing)).to be(true) }
-    specify { expect(subject.for?(:encryption)).to be(false) }
+    specify { expect(subject).to be_for(:signing) }
+    specify { expect(subject).not_to be_for(:encryption) }
   end
 
   it 'decrypts encrypted private keys' do