Skip to content

Instantly share code, notes, and snippets.

View kevingriffin's full-sized avatar

Kevin Griffin kevingriffin

View GitHub Profile
@rewinfrey
rewinfrey / gist:4152978
Created November 27, 2012 07:40
RSpec expectations
Index:
1. should() #basic expectation
2. should_not() #basic negation of an expectation (RSpec does not support using !=)
3. include(item) #called on an enumerable object, this returns true or false if the object is found in the enumerable collection
4. respond_to(:message) #determines if a particular message (as a symbol) is defined for an object
5. raise_error(type, message) #checks if a particular error was raised, accepts zero, one or two parameters