Sha256: 17d21f25f37a8690c1e56f72ef30b542d50d1aada9303b957594c745597f0fac
Contents?: true
Size: 680 Bytes
Versions: 4
Compression:
Stored size: 680 Bytes
Contents
require 'teststrap' context "Using denies" do helper(:denial_context) do |&assertion_block| report = Riot::Context.new("Apple Jackie") do denies("with false", &assertion_block) end.run(MockReporter.new) [report.passes, report.failures, report.errors] end # denial_context asserts("result when returning false from the assertion block") do denial_context { false } end.equals([1,0,0]) asserts("result when returning true from the assertion block") do denial_context { true } end.equals([0,1,0]) asserts("result when assertion block has an exception") do denial_context { raise Exception } end.equals([0,0,1]) end # Using denies
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
riot-0.12.2 | test/core/context/deny_test.rb |
riot-0.12.1 | test/core/context/deny_test.rb |
riot-0.12.0 | test/core/context/deny_test.rb |
riot-0.12.0.pre | test/core/context/deny_test.rb |