Sha256: 1260bd5540542620bb2f4a671cf505f3ea51b92727f3ecee280f8ca06b24631c
Contents?: true
Size: 690 Bytes
Versions: 5
Compression:
Stored size: 690 Bytes
Contents
require 'clean_assert' def method_with_valid_assert assert / "2 == 2" end def method_with_broken_assert assert / "1 == 2" end def method_with_argument value assert / "value == 2" end # Test valid assertions outside of classes and outside of rspec method_with_valid_assert method_with_argument 2 # Test broken assertions outside of classes and outside of rspec begin method_with_broken_assert rescue RuntimeError => e raise if not e.message =~ /Assertion '1 == 2' not satisfied in main#method_with_broken_assert/ end begin method_with_argument 3 rescue RuntimeError => e raise if not e.message =~ /Assertion 'value == 2' not satisfied in main#method_with_argument/ end
Version data entries
5 entries across 5 versions & 1 rubygems