       
     it "should add the attribute as td selector", ->
       expect( $(".fr-row .city").length ).toBeGreaterThan 0
-      
-  describe "flexirails-cell", ->
-    beforeEach ->
-      initFlexirails data, view
-    
+  
+  #
+  describe "flexirails-cell", ->    
     afterEach ->
       destroyFlexirails()
       
     it "should be able to register formatter for cells", ->
+      initFlexirails data, view
       expect( typeof instance.registerFormatter).toBe 'function'
       
+    it "should use a custom formatter on matching cells", ->
+      called = 0
+      cityFormatter = (td, col, obj, attr) ->
+        called = called + 1
+        
+      $(document.body).append $("<div id='flexirails'></div>")
+      elem = $("#flexirails").flexirails { 'datasource':data, 'view': view, 'formatters': {'city':cityFormatter} }
+      instance = $(elem).getFlexirails()
+        
+      expect(called).toBeGreaterThan 0
+  
+  #
   describe "flexirails-navigation", ->
     beforeEach ->
       initFlexirails data, view

  initFlexirails = (data = [], view = {}) ->
    $(document.body).append $("<div id='flexirails'></div>")
    
    $("#flexirails").empty()
    elem = $("#flexirails").flexirails { 'datasource':data, 'view': view }
    instance = $(elem).getFlexirails()
  
  destroyFlexirails = ->
    instance.destroy()
  
  it "should export $.flexirails", ->
    expect(typeof $.flexirails).toEqual "function"
    
  describe "flexirails-instanciation", ->
    beforeEach ->
      initFlexirails()

    
    it "should add a header row to the table", ->
      expect( $(".fr-header").length ).toBeGreaterThan 0
      
    it "should return the plugin instance when calling $.getFlexirails", ->
      plugin = $("#flexirails").getFlexirails()
      expect(plugin instanceof $.flexirails).toBeTruthy
  
  # mock data
  data = [
