Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 98f61d98a7
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (19 sloc) 0.607 kb
# TODO - as/is this forces a dependency on RSpec::Core - need to eliminate that
module RSpec
module Core
class ExampleGroup
module BlockAliases
alias_method :to, :should
alias_method :to_not, :should_not
end
# Extends the submitted block with aliases to and to_not
# for should and should_not. Allows expectations like this:
#
# expect { this_block }.to change{this.expression}.from(old_value).to(new_value)
# expect { this_block }.to raise_error
def expect(&block)
block.extend BlockAliases
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.