Created
September 2, 2009 13:14
-
-
Save jhchabran/179709 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom matchers to expect layouts | |
Spec::Matchers.define :use_layout do |layout| | |
match do |response| | |
response.layout == layout | |
end | |
failure_message_for_should do |employee| | |
"expected response to use layout named #{layout}" | |
end | |
failure_message_for_should_not do |employee| | |
"expected response to not use layout named #{layout}" | |
end | |
description do | |
"expected response to use layout named #{layout}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment