Quantcast
Channel: Code Snippets – Chris Bloom
Viewing all articles
Browse latest Browse all 10

It Should Include Only One Of – An RSpec Matcher

$
0
0
I know RSpec tests should typically be implementation/data agnostic, but I ran into a situation in a unit test where I needed to make sure that the results of a query returned only one of the two records that were created during the setup but without knowing which record that would be ahead of time. […]

Viewing all articles
Browse latest Browse all 10

Trending Articles