views:

214

answers:

1

I got Application.spark and home.spark views.

If layout has:

<span><use content="view" /></span>

And home has:

#RenderPartial("partial")

And partial has:

<div>test</div>    

Then rendered output will be:

<div>test</div><span></span>

Any ideas what's wrong?

Using this spark version with updated System.Web.Mvc assembly.


It seems that

#Html.RenderPartial(...)

Makes problems.


------ Test started: Assembly: Spark.Web.Mvc2.Tests.dll ------

TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.FuturesRenderActionCanRunThroughItsProcess' not executed: Futures assembly Microsoft.Web.Mvc not referenced by ASP.NET MVC 2 preview build

TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn' failed: Expected: "hello" But was: <hello> D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(245,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn()

TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect' failed: Looking for

two

Expected: greater than or equal to 0 But was: -1 D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(155,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.ContainsInOrder(String content, String[] values) D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(347,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect()

68 passed, 2 failed, 1 skipped, took 67,59 seconds (NUnit 2.4).

This test fails

    [Test]
    public void RenderPartialOrderCorrect()
    {

        FindViewAndRender("renderpartial-ordercorrect", "ajax");
        //mocks.VerifyAll();

        var content = output.ToString();
        ContainsInOrder(content,
                        "<p>one</p>",
                        "<p>two</p>",
                        "<p>three</p>");
    }
+1  A: 

Temporary adding viewContextWrapper seems like a solution.


Yap... it's cool now. Including intellisense.

Arnis L.