spec/javascripts/modules/button_spec.coffee in modularity-rails-0.8.1 vs spec/javascripts/modules/button_spec.coffee in modularity-rails-0.9.0
- old
+ new
@@ -12,21 +12,21 @@
template 'button.html'
describe 'manual clicks', ->
it 'fires when clicking on the container directly', ->
- button = new window.Button($('#test #button1'))
+ button = new modularity.Button($('#test #button1'))
button.bind_event('clicked', (spy = jasmine.createSpy()))
button.container.click()
expect(spy).toHaveBeenCalled()
expect(spy.callCount).toEqual(1)
it 'fires when clicking embedded elements of the button', ->
- button = new window.Button($('#test #button2'))
+ button = new modularity.Button($('#test #button2'))
button.bind_event('clicked', (spy = jasmine.createSpy()))
button.container.find('.embedded').click()
expect(spy).toHaveBeenCalled()
@@ -34,10 +34,10 @@
describe 'programmatic clicks', ->
it 'programmatically clicks the button', ->
- button = new window.Button($('#test #button2'))
+ button = new modularity.Button($('#test #button2'))
spy = jasmine.createSpy()
button.bind_event('clicked', spy)
button.click()