should - It's being used like a connector. For example, if a GET request was made to the index of a resource's controller,
fact: the resulting page would have the string, 'I love rails'
spec:
- the spec would therefore expect to have the string, 'I love rails' in it
- we would write the spec as follows:
request.should contain('I love rails')
should_not - it's the 'negative' version of should. This means we need not use 'not' :)
For example, if a GET request was made to the index of a resource's controller,
fact: the resulting page will NOT have the string, 'I love rails'
spec:
- the spec would therefore expect to have the string, 'I love rails' in it
- we would write the spec as follows to say, "we do not expect the resulting request object to have the string, 'I love rails' in its contents":
request.should_not contain('I love rails')
Here's also another article which speaks of this well.
Gordon Yeong :)