Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 621243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:51:11+00:00 2026-05-13T18:51:11+00:00

Has anyone run into this while using Machine.Specifications.Mvc? I setup a spec to test

  • 0

Has anyone run into this while using Machine.Specifications.Mvc?

I setup a spec to test the results of a controller action. In this case:

[Subject("User views the dashboard")]
public class When_a_user_views_the_vendors_page
     : ManagementContext
{
    static ActionResult result;

    Because of = () => result = manageController.Vendors();

    It should_contain_a_list_of_vendors = () => {

        result.ShouldBeAView().And().ShouldHaveModelOfType<List<Core.Vendor>>();
    };
}

The error I get every time is:

Machine.Specifications.SpecificationException: Should be of type System.Web.Mvc.ViewResult but is of type System.Web.Mvc.ViewResult
at Machine.Specifications.ShouldExtensionMethods.ShouldBeOfType(Object actual, Type expected) in d:\BuildAgent-01\work\340c36596c29db8\Source\Machine.Specifications\ExtensionMethods.cs:line 206

Has anyone seen this? Is there an easy way to resolve it? It seems to be happening in the Machine.Specifications library. I even ran it in a debug mode to check the values and they are indeed both ViewResult objects and with the correct model data even.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:51:11+00:00Added an answer on May 13, 2026 at 6:51 pm

    Okay… Silly problem. (I knew it would be). I’ve recently begun experimenting with MVC2. Machine.Specifications.Mvc out of the box is wired to 1.0;

    I re-referenced Machine.Specifications.Mvc to Mvc2, and it worked like a charm.

    doh! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 510k
  • Answers 510k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer GroupLayout was added to JDK1.6. May 16, 2026 at 4:53 pm
  • Editorial Team
    Editorial Team added an answer So according to http://idea.uab.es/mcreel/ParallelKnoppix/, on PelicanHPC "The LAM-MPI and OpenMPI… May 16, 2026 at 4:53 pm
  • Editorial Team
    Editorial Team added an answer Absurdly, changing /git/Lunch.git/lunch-receive > lunch.txt to: /git/Lunch.git/lunch-receive > lunch.txt 2>&1… May 16, 2026 at 4:53 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

This one has been driving me nuts for a few days now and I've
I'm trying to test the DB2 adapter for BizTalk 2006 (not R2). While trying
Summary: I'm having some svn trouble, and after debugging it for a while, I'm
I'm facing this strange problem. I'm trying to read a file that is located
I'm developing an application on two different machines (home and work) and while the
When implementing texture mapping on a standard polygonal mesh using the usual algorithm, you
I have two programs which are accessing a directory using the .NET Directory class
Hey guys, I'm using GWT for a data-driven web application, and I'm having issues
I am looking for examples of configuration based validation using Validation Application Block. I've
I was wondering what approaches others might have for testing domain services against a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.