Sha256: 4fdd23e09170e8b125052d040a5de17786d7ebee19556258aa2b7042315ef083
Contents?: true
Size: 517 Bytes
Versions: 18
Compression:
Stored size: 517 Bytes
Contents
module RSpec module Matchers module BlockAliases alias_method :to, :should alias_method :to_not, :should_not alias_method :not_to, :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
18 entries across 18 versions & 4 rubygems