 
 (deftest execute-steps-inheritance-test
   (testing "that the step-results channel passed in contains the step-results of all childrens"
-    (let [step-results-channel (async/chan 100)]
+    (let [step-results-channel (async/chan 100)
+          ctx (some-ctx-with   :step-results-channel step-results-channel
+                               :step-id [0]
+                               :build-number 2)]
       (execute-steps [some-other-step some-step-faking-events-from-build-3 some-failing-step]
                      {}
-                     (some-ctx-with :step-results-channel step-results-channel
-                                    :step-id [0]
-                                    :build-number 2))
+                     ctx)
       (is (= [{:build-number 2 :step-id [1 0] :step-result {:status :running}}
               {:build-number 2 :step-id [1 0] :step-result {:foo :baz :status :success}}
               {:build-number 2 :step-id [2 0] :step-result {:status :running}}


(defn some-pipeline-state []
  (atom {}))

(deftest execute-step-test
  (testing "that executing returns the step result added to the input args"

  (testing "that the event bus is notified when a step finishes"
    (let [ctx (some-ctx-with :build-number 3
                             :step-id [1 2 3])
          step-finished-events (step-finished-events-for ctx)]
      (execute-step {} [ctx some-other-step])
      (is (= [{:build-number 3
               :step-id [1 2 3]
