             .toBe  1 
             done()
 
+        it "has the correct textual representation", (done) ->
+            expect table.find("table.pvtTable").text()
+            .toBe ["Totals", "4"].join("")
+            done()
+
         it "has a correct grand total with data value", (done) ->
             expect table.find("td.pvtGrandTotal").text()
             .toBe  "4"

            .toBe  4
            done()

describe "pivotUI() with specified rows/cols, sum-over-sum aggregator, Heatmap renderer",  ->
    table = null

    beforeEach (done) ->
        pivotOptions = 
            rows: ["gender"], cols: ["colour"]
            aggregatorName: "Sum over Sum"
            vals: ["successes", "trials"]
            rendererName: "Heatmap"
            onRefresh: done
        table = $("<div>").pivotUI fixtureData, pivotOptions

    it "loads a table", (done) ->
        expect table.find("table.pvtTable").length
        .toBe  1 
        done()


    it "has all the basic UI elements", (done) ->
        expect table.find("td.pvtAxisContainer").length

        .toBe  "Count"
        done()

    it "renders a table", (done) ->
        expect table.find("table.pvtTable").length
        .toBe  1 
        done()


    describe "its renderer output", ->
        it "has the correct type and number of cells", (done) ->
            expect table.find("th.pvtTotalLabel").length
