Class: RSpec::Core::ExampleGroup
- Inherits:
-
Object
- Object
- RSpec::Core::ExampleGroup
- Defined in:
- lib/rspec/expectations/extensions/rspec/core/example_group.rb
Defined Under Namespace
Modules: BlockAliases
Instance Method Summary collapse
-
#expect(&block) ⇒ Object
Extends the submitted block with aliases to and to_not for should and should_not.
Instance Method Details
#expect(&block) ⇒ Object
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
14 15 16 |
# File 'lib/rspec/expectations/extensions/rspec/core/example_group.rb', line 14 def expect(&block) block.extend BlockAliases end |