spec/javascripts/mercury/mercury_spec.js.coffee in mercury-rails-0.2.0 vs spec/javascripts/mercury/mercury_spec.js.coffee in mercury-rails-0.2.3

- old
+ new

@@ -10,19 +10,19 @@ it "disallows konqueror and msie", -> describe "#bind", -> - it "binds an event prefixed with 'mercury:' to document", -> + it "binds an event prefixed with 'mercury:' to the top window", -> callCount = 0 Mercury.bind('test', -> callCount += 1) - $(document).trigger("mercury:test") + $(top).trigger("mercury:test") expect(callCount).toEqual(1) describe "#trigger", -> - it "triggers an event prefixed with 'mercury:' on document", -> + it "triggers an event prefixed with 'mercury:' on the top window", -> argsForCall = [] callCount = 0 Mercury.bind('test', -> argsForCall[callCount] = arguments; callCount += 1) Mercury.trigger("test", {foo: 'bar'}) expect(callCount).toEqual(1)