             props:
                 foo: 'string'
                 bar: 'string'
+
         comp = Lanes.Test.makeComponent({
-            bindDataEvents:
+            bindEvents:
                 model: 'change:bar'
         }, {
             model: model
         })
-        spyOn(comp, 'setState')
+        spyOn(comp, 'forceUpdate')
         model.foo = "bar"
-        expect(comp.setState).not.toHaveBeenCalled()
+        expect(comp.forceUpdate).not.toHaveBeenCalled()
         model.bar = "foo"
-        expect(comp.setState).toHaveBeenCalledWith( model: model )
+        expect(comp.forceUpdate).toHaveBeenCalled()
 
     it "can rebind events", ->
         Model = Lanes.Test.defineModel

describe "Lanes.React.DataMixin", ->

    it "fires setState for a model", ->
        model = Lanes.Test.makeModel
            props:
                id: 'integer'
                foo: 'string'
        comp = Lanes.Test.makeComponent({}, model: model)
        spyOn(comp, 'setState')
        model.foo = "bar"
        expect(comp.setState).toHaveBeenCalledWith( model: model )

    it "fires setState for a collection", ->
        collection = Lanes.Test.makeCollection()
        comp = Lanes.Test.makeComponent({}, collection: collection)
        spyOn(comp, 'setState')
        collection.add([{}])
        expect(comp.setState).toHaveBeenCalledWith( collection: collection )

    it "obeys global pubsub settings", ->
        spyOn(Lanes.Models.PubSub, 'add').and.callThrough()

        comp = Lanes.Test.makeComponent({}, {
            model: m1
        })
        spyOn(comp, 'forceUpdate')
        m1.foo = "bar"
        expect(comp.forceUpdate).toHaveBeenCalled()

        comp.modelBindings.reset(model: m2)
        comp.forceUpdate.calls.reset()

        m1.foo = "a different bar"
        expect(comp.forceUpdate).not.toHaveBeenCalled()
        m2.foo = "bar"
        expect(comp.forceUpdate).toHaveBeenCalled()
