Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 93930800f9
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (16 sloc) 0.477 kB
module RSpec
module Matchers
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
Jump to Line
Something went wrong with that request. Please try again.