Sha256: 1e37b47494b90930b8f293041ff8dda593e27330ce1bb0253139241ea6aa77cd
Contents?: true
Size: 477 Bytes
Versions: 11
Compression:
Stored size: 477 Bytes
Contents
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
Version data entries
11 entries across 11 versions & 2 rubygems