Sha256: a5b9c166518ba52af05f5018c88a912dac8a47eeda9aa15af9b56d99c21826f4

Contents?: true

Size: 899 Bytes

Versions: 9

Compression:

Stored size: 899 Bytes

Contents

describe "Teaspoon.Reporters.HTML.FailureView", ->

  describe "constructor", ->

    it "assigns @spec", ->
      spec = {foo: "bar"}
      spyOn(Teaspoon.Reporters.HTML.FailureView.prototype, 'build')
      subject = new Teaspoon.Reporters.HTML.FailureView(spec)
      expect(subject.spec).toBe(spec)


  describe "#build", ->

    beforeEach ->
      @mockSpec =
        link: "_link_",
        fullDescription: "_full_description_"
        errors: ->
          [{message: "_error_message_", stack: "_error_stack_"}]
      @subject = new Teaspoon.Reporters.HTML.FailureView(@mockSpec)
      @subject.build()

    it "builds the html", ->
      content = @subject.el.innerHTML
      expect(content).toContain('href="_link_"')
      expect(content).toContain('_full_description_')
      expect(content).toContain("<strong>_error_message_</strong>")
      expect(content).toContain("_error_stack_")

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
teaspoon-0.9.1 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.9.0 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.8.0 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.7.9 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.7.8 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.7.7 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.7.6 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.7.5 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee
teaspoon-0.7.4 spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee