Sha256: 73c0e99a8cacad40673c73b22ad67cf6b604383f459744e5d1e4541c6485e33e

Contents?: true

Size: 795 Bytes

Versions: 10

Compression:

Stored size: 795 Bytes

Contents

#= require services/calculate

describe "Calculate", ->
  before ->
    @service = new Calculate()

  it "should have serviceName 'calculate'", ->
    expect(@service.serviceName).to.equal('calculate') 

  describe "#calculate", ->
    before ->
      @service.calculate()

    it "should calculate result", ->
      expect(@service.result).to.equal(400)

  describe "#serve", ->
    before ->
      $('#fixtures').html("<div class='calculate'><span class='result'></span></div>")
      $('#fixtures').trigger('ex:services:calculate')
    after ->
      $('#fixtures').empty()

    it "should calculate the result", ->
      expect($('.calculate')).to.have.class('calculate_active')

    it "should render the result to the span.result", ->
      expect($('span.result').text()).to.equal('400')

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
transponder-2.0.0 spec/javascripts/transponder/services/calculate_test.coffee
transponder-1.0.0 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.10.4 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.10.2 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.10.1 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.9.6 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.9.5 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.9.4 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.9.3 spec/javascripts/transponder/services/calculate_test.coffee
transponder-0.9.2 spec/javascripts/transponder/services/calculate_test.coffee