Commit 560df06

mokha <mokha@cisco.com>
2018-03-05 23:51:24
delete tempfiles after test.
1 parent d22814d
Changed files (1)
spec
saml
kit
cli
spec/saml/kit/cli/commands/metadata_spec.rb
@@ -4,9 +4,12 @@ RSpec.describe Saml::Kit::Cli::Commands::Metadata do
   let(:entity_id) { 'https://saml-kit-proof.herokuapp.com/metadata' }
 
   describe "#register" do
-    let(:env) { "SAMLKITRC=#{Tempfile.new('saml-kit').path}" }
+    let(:env) { "SAMLKITRC=#{tempfile}" }
+    let(:tempfile) { Tempfile.new('saml-kit').path }
     let(:command) { "metadata register #{entity_id}" }
 
+    after { File.unlink(tempfile) }
+
     specify { expect(status).to be_success }
     specify { expect(output).to include(entity_id) }
     specify { expect(output).to match(/EntityDescriptor/) }