简体   繁体   中英

Does Nspec have something like Rspec's should_receive?

I am writing an Nspec to test some file manipulation. I want to be able to intercept the call just before renaming the file, and I thought something similar to Rspec's should_receive should do. However I can't find anything like that in the Nspec documentations. Is there a equivalent in Nspec?

The short answer is No.

Nspec is a BDD testing framework without any Mocking/Stubbing capability. If you want to use something like should_receive in rspec you need to use one of the many mocking frameworks in .net.

Some options:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM