Skip to content

Instantly share code, notes, and snippets.

@SlyNet
Created March 5, 2012 15:12
Show Gist options
  • Save SlyNet/1978688 to your computer and use it in GitHub Desktop.
Save SlyNet/1978688 to your computer and use it in GitHub Desktop.
using System.Web.Mvc;
using Hoya.Administration.Web.UI.Controllers;
using Machine.Specifications;
namespace Hoya.Administration.Web.UI.Specs.SessionControllerSpecs
{
[Subject(typeof(SessionController))]
public class SessionControllerSpec : BaseSpec
{
static SessionController controller;
static ViewResult actionResult;
Establish context = () => controller = mocker.Create<SessionController>();
public class when_index_action_called
{
Establish context = () => controller = null;
Because of = () => actionResult = controller.Show() as ViewResult;
It should_return_view = () => actionResult.ShouldBeOfType<ViewResult>();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment