Sha256: e64e601b7dc4743e406d1f33ecb24f29a7c79bb40055c3046f0284765a5f50a4

Contents?: true

Size: 827 Bytes

Versions: 3

Compression:

Stored size: 827 Bytes

Contents

describe("hooch", function() {

  beforeEach(function() {
  });

  it("empties an element", function() {
    var emptier_div = affix('[data-emptier="true"][data-target="#my_div"]')
    var emptier_target = affix('#my_div')
    emptier_target.html('stuff')
    $('[data-emptier]').each(function(){new hooch.Emptier($(this))})
    expect(emptier_target.html()).toMatch('stuff');
    $('[data-emptier]').click()
    expect(emptier_target.html()).not.toMatch('stuff');
  });

  it("removes an element", function(){
    var remover_div = affix('[data-remover="true"][data-target="#my_div"]')
    var remover_target = affix('#my_div')
    $('[data-remover]').each(function(){new hooch.Remover($(this))})
    expect($('#my_div').length).toEqual(1)
    $('[data-remover]').click()
    expect($('#my_div').length).toEqual(0)
  });

});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hooch-0.0.8 jasmine/spec/hoochSpec.js
hooch-0.0.7 jasmine/spec/hoochSpec.js
hooch-0.0.6 jasmine/spec/hoochSpec.js