           jruby-puppet (:jruby-puppet instance)
           container (:scripting-container instance)
 
+          _ (create-file (fs/file conf-dir "puppet.conf")
+                         "[main]\nenvironment_timeout=unlimited\nbasemodulepath=$codedir/modules\n")
+
           env-dir (fn [env-name]
                     (fs/file code-dir "environments" env-name))
-          create-file (fn [file content]
-                        (ks/mkdirs! (fs/parent file))
-                        (spit file content))
-          gen-classes (fn [[mod-dir manifests]]
-                        (let [manifest-dir (fs/file mod-dir "manifests")]
-                          (ks/mkdirs! manifest-dir)
-                          (doseq [manifest manifests]
-                            (spit (fs/file manifest-dir (str manifest ".pp"))
-                                  (str
-                                    "class " manifest "($" manifest "_a, Integer $"
-                                    manifest "_b, String $" manifest
-                                    "_c = 'c default value') { }\n"
-                                    "class " manifest "2($" manifest "2_a, Integer $"
-                                    manifest "2_b, String $" manifest
-                                    "2_c = 'c default value') { }\n")))))
-          create-env-conf (fn [env-dir content]
-                            (create-file (fs/file env-dir "environment.conf")
-                                         (str "environment_timeout = unlimited\n"
-                                              content)))
-          create-env (fn [[env-dir manifests]]
-                       (create-env-conf env-dir "")
-                       (gen-classes [env-dir manifests]))
-
-          _ (create-file (fs/file conf-dir "puppet.conf")
-                         "[main]\nenvironment_timeout=unlimited\nbasemodulepath=$codedir/modules\n")
-
           env-1-dir (env-dir "env1")
           env-1-dir-and-manifests [env-1-dir ["foo" "bar"]]
           _ (create-env env-1-dir-and-manifests)

            [me.raynes.fs :as fs]
            [cheshire.core :as cheshire])
  (:import (java.util.concurrent LinkedBlockingDeque)))

(deftest ^:integration class-info-test
  (testing "class info properly enumerated for"

              (testing "all environments"
                (is (= expected-envs-info (get-class-info))))
              (testing "one environment by name"
                (is (nil? (get-class-info-for-env "env1"))
                    "Unexpected info retrieved for 'env1'")
                (is (= (expected-envs-info "env2")
                       (get-class-info-for-env "env2"))
                    "Unexpected info retrieved for 'env2'")
