Sha256: 869117263b23ad00219679b14b75b0f89f90b648cc2a76409366dbba3589c91a
Contents?: true
Size: 548 Bytes
Versions: 110
Compression:
Stored size: 548 Bytes
Contents
require 'rspec/expectations/extensions/kernel' 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. # # @example # 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
110 entries across 59 versions & 7 rubygems