//Stubs: static  code so we don't test Redux

Redux.createStore = Redux.applyMiddleware = function() {
  return {
    subscribe: function() {}
  }
};

// specs code
describe("Redux.connect", function() {

  it("is defined as function", function() {
    expect(Redux.connect).toBeDefined();
    expect(typeof Redux.connect).toBe('function');
  });


  describe("A spy", function() {
    var component = {
        render: function() {

        }
      },
      hoc, params = {};

    beforeEach(function() {

      spyOn(Redux, 'connect').andCallThrough();
      spyOn(component, 'render').andCallThrough();

      hoc = Redux.connect(component);
      hoc(params);
    });

    it("tracks that the spy was called", function() {
      expect(Redux.connect).toHaveBeenCalled();
      expect(typeof hoc).toBe('function');
    });
  });

});

@@ -9,17 +9,16 @@
  static 
- 
 code so 
@@ -106,16 +106,67 @@
 eturn %7B%0A
+    getState: function() %7B%0A      return %7B%7D;%0A    %7D,%0A
     subs
@@ -189,16 +189,17 @@
 ) %7B%7D%0A  %7D
+;
 %0A%7D;%0A%0A// 
@@ -456,22 +456,22 @@
         
-render
+update
 : functi
@@ -480,18 +480,8 @@
 () %7B
-%0A%0A        
 %7D%0A  
@@ -509,16 +509,45 @@
 ams = %7B%7D
+,%0A      wrappedComp, instance
 ;%0A%0A    b
@@ -617,16 +617,88 @@
 rough();
+%0A%0A      hoc = Redux.connect(component);%0A      wrappedComp = hoc(params);
 %0A      s
@@ -718,14 +718,14 @@
 t, '
-render
+update
 ').a
@@ -752,56 +752,385 @@
     
-hoc = Redux.connect(component);%0A      hoc(params
+instance = wrappedComp.update(true);%0A    %7D);%0A%0A    it(%22Redux.connect was called%22, function() %7B%0A      expect(Redux.connect).toHaveBeenCalled();%0A%0A    %7D);%0A%0A    it(%22Redux.connect returns a HoC function%22, function() %7B%0A      expect(typeof hoc).toBe('function');%0A    %7D);%0A    it(%22Redux.connect HoC function can be called with params%22, function() %7B%0A      expect(wrappedComp).toBeDefined(
 );%0A 
@@ -1136,25 +1136,24 @@
     %7D);%0A
-%0A
     it(%22
 tracks t
@@ -1148,38 +1148,255 @@
 it(%22
-tracks that the spy was called
+HoC function called returns an object with a store property%22, function() %7B%0A      expect(typeof wrappedComp).toBe('object');%0A      expect(wrappedComp.store).toBeDefined();%0A    %7D);%0A    it(%22HoC function called returned Object can call update function
 %22, f
@@ -1416,37 +1416,40 @@
      expect(
-Redux.connect
+component.update
 ).toHaveBeen
@@ -1466,44 +1466,186 @@
     
-  expect(typeof hoc).toBe('function'
+%7D);%0A    it(%22update function returns the same instance with a store property%22, function() %7B%0A      expect(typeof instance).toBe('object');%0A      expect(instance.store).toBeDefined(
 );%0A 

Update spec.js