Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View beautiful_and_dry.rb
1
commentor.should_receive(:add).with(anonymous_comment)
View beautiful_and_dry.rb
1 2 3 4 5
# This
response['X-Runtime'].should =~ /[\d\.]+/
 
# .. or this?
response['X-Runtime'].should be_a_number
View beautiful_and_dry.rb
1 2 3 4 5
RSpec::Matchers.define :be_a_multiple_of do |expected|
match do |actual|
actual % expected == 0
end
end
View beautiful_and_dry.rb
1 2
expected_comment = Comment.new(anonymous: true, user: "the dude", reply_to: nil)
commentor.should_receive(:add).with(expected_comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.