Created
March 5, 2012 15:12
-
-
Save SlyNet/1978688 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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