Module: Saharspec::Its
- Defined in:
- lib/saharspec/its.rb,
lib/saharspec/its/map.rb,
lib/saharspec/its/call.rb,
lib/saharspec/its/block.rb
Overview
Wrapper module for all its_*
RSpec additions.
See:
#its_map
subject { %w[1 2 3] }
its_map(:to_s) { is_expected.to eq [1, 2, 3] }
#its_call
subject { [1, 2, 3].method(:[]) }
its_call(2) { is_expected.to ret 3 }
its_call('foo') { is_expected.to raise_error }
#its_block
subject { something_action }
its_block { is_expected.not_to raise_error }
its_block { is_expected.to change(some, :value).by(1) }