Created
July 14, 2011 22:33
-
-
Save sbellware/1083635 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| module RSpec | |
| module Core | |
| module Hooks | |
| def act(*args, &block) | |
| scope, options = scope_and_options_from(*args) | |
| hooks[:before][scope] << BeforeHook.new(options, &block) | |
| end | |
| def act_after(*args, &block) | |
| scope, options = scope_and_options_from(*args) | |
| hooks[:after][scope] << AfterHook.new(options, &block) | |
| end | |
| alias :cause :act_after | |
| alias :act_on_double :act_after | |
| 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 | |
| RSpec.configure do |config| | |
| config.alias_example_to :observe | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment