method

expect

rspec latest stable - Class: Spec::Example::ExampleMethods
expect(&block)
public

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