Skip to content

Instantly share code, notes, and snippets.

@sbellware
Created December 13, 2010 20:28
Show Gist options
  • Select an option

  • Save sbellware/739546 to your computer and use it in GitHub Desktop.

Select an option

Save sbellware/739546 to your computer and use it in GitHub Desktop.
For RSpec 2, in spec/support
module RSpec
module Core
module Hooks
def because(*args, &block)
scope, options = scope_and_options_from(*args)
hooks[:after][scope] << AfterHook.new(options, &block)
end
end
end
module Mocks
module Methods
alias_method :should_have_received, :should_receive
alias_method :should_not_have_received, :should_not_receive
end
end
end
alias :context :describe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment