spec/javascripts/teaspoon/base/reporters/html_spec.coffee in teaspoon-0.7.9 vs spec/javascripts/teaspoon/base/reporters/html_spec.coffee in teaspoon-0.8.0

- old
+ new

@@ -27,16 +27,15 @@ Teaspoon.params = @originalParams describe "constructor", -> it "sets up the expected variables", -> - expect(@reporter.start).toBeDefined() expect(@reporter.config).toEqual("use-catch": true, "build-full-report": false, "display-progress": true) expect(@reporter.total).toEqual({exist: 0, run: 0, passes: 0, failures: 0, skipped: 0}) expect(@reporter.views).toEqual({specs: {}, suites: {}}) - expect(@reporter.filters).toEqual(["by match: foo <a href='/teaspoon/default'>remove</a>"]) + expect(@reporter.filters).toEqual(["by match: foo"]) it "calls readConfig", -> expect(@readConfigSpy).toHaveBeenCalled() @@ -108,11 +107,11 @@ Teaspoon.suites = @originalSuites it "builds a select that displays the suites", -> result = @reporter.buildSuiteSelect() expect(result).toContain("select id=") - expect(result).toContain("selected='selected' value=\"foo\"") + expect(result).toContain("selected value=\"#{Teaspoon.root}/foo\"") describe "#buildProgress", -> beforeEach -> @@ -337,37 +336,37 @@ @reporter.filters = [] @reporter.setFilters() it "sets a class and the html for the filter display", -> expect(@reporter.filters.length).toBe(2) - expect(@reporter.filters[0]).toBe("by file: _file_ <a href='/teaspoon/default'>remove</a>") - expect(@reporter.filters[1]).toBe("by match: _grep_ <a href='/teaspoon/default'>remove</a>") + expect(@reporter.filters[0]).toBe("by file: _file_") + expect(@reporter.filters[1]).toBe("by match: _grep_") describe "#readConfig", -> beforeEach -> @readConfigSpy.andCallThrough() @config = {} - @cookieSpy = spyOn(@reporter, "cookie").andReturn(@config) + @storeSpy = spyOn(@reporter, "store").andReturn(@config) @reporter.readConfig() it "reads the configuration from the cookie", -> - expect(@cookieSpy).toHaveBeenCalledWith("teaspoon") + expect(@storeSpy).toHaveBeenCalledWith("teaspoon") expect(@reporter.config).toEqual(@config) describe "#toggleConfig", -> beforeEach -> - @refreshSpy = spyOn(@reporter, "refresh") - @cookieSpy = spyOn(@reporter, "cookie") + @refreshSpy = spyOn(Teaspoon, "reload") + @storeSpy = spyOn(@reporter, "store") @reporter.toggleConfig(target: {tagName: "button", getAttribute: -> "teaspoon-use-catch"}) it "toggles the configuration", -> expect(@reporter.config["use-catch"]).toBe(false) it "sets the cookie", -> - expect(@cookieSpy).toHaveBeenCalledWith("teaspoon", @reporter.config) + expect(@storeSpy).toHaveBeenCalledWith("teaspoon", @reporter.config) it "refreshes the page", -> expect(@refreshSpy).toHaveBeenCalled()