Skip to content

Instantly share code, notes, and snippets.

@chrisseaton
Created February 3, 2015 21:45
Show Gist options
  • Save chrisseaton/dbadb66331f9a969f24b to your computer and use it in GitHub Desktop.
Save chrisseaton/dbadb66331f9a969f24b to your computer and use it in GitHub Desktop.
class ShouldWrapper
def initialize(value)
@value = value
end
def ==(other)
if @value == other
puts ":)"
else
puts "expecting #{other.inspect}, got #{@value.inspect}"
end
end
end
module Kernel
def should
ShouldWrapper.new(self)
end
end
def mock(name)
Object.new
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment