spec_app/spec/javascripts/up/magic_spec.js.coffee in upjs-rails-0.11.1 vs spec_app/spec/javascripts/up/magic_spec.js.coffee in upjs-rails-0.12.0

- old
+ new

@@ -23,22 +23,22 @@ observeClass = jasmine.createSpy() up.compiler '.child', ($element) -> observeClass($element.attr('class')) - up.ready(affix('.container .child')) + up.hello(affix('.container .child')) expect(observeClass).not.toHaveBeenCalledWith('container') expect(observeClass).toHaveBeenCalledWith('child') it 'lets allows initializers return a destructor function, which is called when a compiled fragment gets destroyed', -> destructor = jasmine.createSpy() up.compiler '.child', ($element) -> destructor - up.ready(affix('.container .child')) + up.hello(affix('.container .child')) expect(destructor).not.toHaveBeenCalled() up.destroy('.container') expect(destructor).toHaveBeenCalled() @@ -49,25 +49,25 @@ observeArgs($element.attr('class'), data) data = { key1: 'value1', key2: 'value2' } $tag = affix(".child").attr('up-data', JSON.stringify(data)) - up.ready($tag) + up.hello($tag) expect(observeArgs).toHaveBeenCalledWith('child', data) it 'passes an empty object as a second argument to the initializer if there is no up-data attribute', -> observeArgs = jasmine.createSpy() up.compiler '.child', ($element, data) -> observeArgs($element.attr('class'), data) - up.ready(affix(".child")) + up.hello(affix(".child")) expect(observeArgs).toHaveBeenCalledWith('child', {}) - describe 'up.ready', -> + describe 'up.hello', -> it 'should have tests' \ No newline at end of file