Skip to content

Instantly share code, notes, and snippets.

@wycats
Created September 18, 2008 01:19
Show Gist options
  • Save wycats/11346 to your computer and use it in GitHub Desktop.
Save wycats/11346 to your computer and use it in GitHub Desktop.
Spec::Matchers.create(:be_successful) do
matches do |rack|
rack.status == 200
end
message do |not_string, rack|
"Expected #{describe_request(rack)}#{not_string} " \
"to be successful, but it returned a #{rack.status}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment