Пример #1
0
        public void instructions_in_a_solution_template()
        {
            executePlan(x => x.AddTemplate("Simple"));

            // instructions are built as part of the plan, but not written now
            thePlan.WriteInstructions();

            readFile("instructions.txt").ShouldContain("The next thing you wanna do is run rake");
        }
Пример #2
0
        public static void ExecutePlan(TemplatePlan plan)
        {
            plan.Execute();

            new RakeStep().Alter(plan);


            plan.WriteInstructions();
        }
Пример #3
0
        public void add_instructions_simple()
        {
            var plan = new TemplatePlan("root");

            plan.AddInstructions("some foo");

            plan.WriteInstructions();

            new FileSystem().ReadStringFromFile("root".AppendPath(TemplatePlan.InstructionsFile))
            .ShouldContain("some foo");
        }
Пример #4
0
        public void add_instructions_with_substitution()
        {
            var plan = new TemplatePlan("root");

            plan.Substitutions.Set("%SOLUTION_NAME%", "Foo");
            plan.AddInstructions("the solution is '%SOLUTION_NAME%'");

            plan.WriteInstructions();

            new FileSystem().ReadStringFromFile("root".AppendPath(TemplatePlan.InstructionsFile))
            .ShouldContain("the solution is 'Foo'");
        }
Пример #5
0
        public static void ExecutePlan(TemplatePlan plan, Action beforeRake = null)
        {
            plan.Execute();

            if (beforeRake != null)
            {
                beforeRake();
            }
            new RakeStep().Alter(plan);

            plan.WriteInstructions();
        }