spec/lib/xmldsig_spec.rb in xmldsig-0.2.2 vs spec/lib/xmldsig_spec.rb in xmldsig-0.2.3

- old
+ new

@@ -40,8 +40,19 @@ it "should be validateable" do signed_document.validate(certificate).should be_true end end end + + Dir["spec/fixtures/signed/*.xml"].each do |document| + describe "#{document}" do + let(:signed_document) { Xmldsig::SignedDocument.new(File.read(document)) } + let(:certificate) { OpenSSL::X509::Certificate.new(File.read(document.gsub('.xml', '.cert'))) } + + it "should be validateable" do + signed_document.validate(certificate).should be_true + end + end + end end end