 
 beforeEach -> mkdir @workspacePath = "spec/tmp/public/assets"
 afterEach  -> clear "spec/tmp/"
+
+keysShouldBeEqualIn = (written, expected) ->
+  expect(_(JSON.parse(written).files).keys().sort()).toEqual(_(expected.files).keys().sort())
 
 describe "rails_asset_digest", ->
 

      Given -> write("#{@workspacePath}/manifest.json", JSON.stringify(@existingManifest))
      Given (done) -> runGruntTask("rails_asset_digest", @config, done)
      When  -> @writtenManifest = read("#{@workspacePath}/manifest.json")
      Then  -> expect(JSON.parse(@writtenManifest)).toEqual(@expectedManifest)

  context "an empty manifest", ->


      Given -> write("#{@workspacePath}/manifest.json", JSON.stringify(@existingManifest))
      Given (done) -> runGruntTask("rails_asset_digest", @config, done)
      When  -> @writtenManifest = read("#{@workspacePath}/manifest.json")
      Then  -> keysShouldBeEqualIn(@writtenManifest, @expectedManifest)

    describe "normalizes the asset path by adding a trailing slash", ->

