Sha256: 2ccec8c332e5301adcc480fe1c0583589ee07c6c855032df7cd5e29f9626a5d2
Contents?: true
Size: 390 Bytes
Versions: 3
Compression:
Stored size: 390 Bytes
Contents
describe "Matcher::Satisfy" do it 'satisfy passes when the block returns true' do expect(1).to satisfy{|v| v == 1} end it 'satisfy fails when the block returns false' do expect_failure{ expect(1).to satisfy{|v| v == 3} } end it 'satisfy fails when the block raises an exception' do expect{ expect(1).to satisfy{|v| 1/0 } }.to raise_error(ZeroDivisionError) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bacon-expect-1.0.2 | spec_app/spec/matchers/satisfy_spec.rb |
bacon-expect-1.0.1 | spec_app/spec/matchers/satisfy_spec.rb |
bacon-expect-0.1 | spec_app/spec/matchers/satisfy_spec.rb |