   dom_from_data_file = (filename) ->
     (new xmldom.DOMParser()).parseFromString fs.readFileSync("#{__dirname}/data/#{filename}").toString()
 
-  before ->
+  before =>
     @good_response_dom = dom_from_data_file "good_response.xml"
 
   describe 'xml metadata', ->
-    xit 'is valid xml', (done) ->
+    it.skip 'is valid xml', (done) ->
       assert false
       done()
-    xit 'contains expected fields', (done) ->
+    it.skip 'contains expected fields', (done) ->
       assert false
       done()
 
   # Login
   describe 'login url', ->
-    xit 'creates an AuthRequest that is base64 encoded and compressed', (done) ->
+    it.skip 'creates an AuthRequest that is base64 encoded and compressed', (done) ->
       assert false
       done()
-    xit 'includes relay URL', (done) ->
+    it.skip 'includes relay URL', (done) ->
       assert false
       done()
-    xit 'is configured according to the identity provider', (done) ->
+    it.skip 'is configured according to the identity provider', (done) ->
       assert false
       done()
 
   # Auth Request, before it is compressed and base-64 encoded
-  describe 'AuthRequest', ->
+  describe 'create_authn_request', ->
     it 'contains expected fields', (done) ->
       saml2.create_authn_request 'https://sp.example.com/metadata.xml', 'https://sp.example.com/assert', 'https://idp.example.com/login', (err, result) ->
         assert not err?, "Got error: #{err}"

      assert.deepEqual saml2.pretty_assertion_attributes(test_attributes), expected

  describe 'decrypt_assertion', ->
    it 'decrypts and extracts an assertion', (done) ->
      key = fs.readFileSync("#{__dirname}/data/test.pem").toString()
      saml2.decrypt_assertion @good_response_dom, key, (err, result) ->
        assert not err?, "Got error: #{err}"
        assert.equal result, fs.readFileSync("#{__dirname}/data/good_response_decrypted.xml").toString()
        done()

    it 'errors if an incorrect key is used', (done) ->
      key = fs.readFileSync("#{__dirname}/data/test2.pem").toString()
      saml2.decrypt_assertion @good_response_dom, key, (err, result) ->
        assert (err instanceof Error), "Did not get expected error."

      idp = new saml2.IdentityProvider 'http://idp.example.com/login', 'http://idp.example.com/logout', 'other_service_cert'

      async.waterfall [
        (cb_wf) -> sp.create_login_url idp, 'http://sp.example.com/assert', cb_wf
      ], (err, login_url, id) ->
        assert not err?, "Error creating login URL: #{err}"
        parsed_url = url.parse login_url, true
