Questions tagged [mspec]

Machine.Specifications is a context/specification framework for C#. Not to be confused with the mspec Ruby framework (tag [mspec-ruby]) used in RubySpecs.

Machine.Specifications is a context/specification framework for C# geared towards removing language noise and simplifying tests.

215 questions
0
votes
2 answers

ASP.NET MVC tests with MSpec. Is this correct or needs refactoring?

I'm new to MSpec and would like to know if the way I wrote my test for ASP.NET MVC is correct. The test passes but I don't really like the way it's written and it seems awkward. I'm certainly missing something. public class…
Tomasz Jaskuλa
  • 15,723
  • 5
  • 46
  • 73
0
votes
1 answer

How do I make a test runner that can execute tagged MSpec tests?

I have a suite of mspec test cases that has the [Tags] attribute defined for each. I now have to create a test runner in .Net/C# that takes the tags attribute values(an array of strings) as input and runs the corresponding tests. I would like to…
CMS
  • 133
  • 1
  • 1
  • 7
0
votes
1 answer

Running Selenium tests from team city/mspec

We are running selenium webdriver tests that have been written using mspec. We fire these tests from team city using the built in mspec runner. This is using firefox locally on the server to run the tests. We seem to get random results with varying…
78lro
  • 1,790
  • 7
  • 37
  • 63
0
votes
1 answer

Translating a "story" into a MSpec specification

I've been learning about BDD and after trying out a few frameworks have decided to use MSpec in my latest project. After looking through some examples, I'm unsure about how to identify the scenario and context. Take the following story (taken from…
Ben Foster
  • 34,340
  • 40
  • 176
  • 285
-1
votes
1 answer

How do I assert a method was called on this mocked dependency with moq and mspec?

I was testing a model repository to see if it calls the message bus. I am not sure if this is a good test at all but here is my thinking: I would normally put the bus.send into the controller (this is an MVC web app) but since I don't want to test…
kind_robot
  • 2,383
  • 4
  • 31
  • 45
1 2 3
14
15