Sha256: 6797f873b221582a97cccc01e7efcb22152d026ec8f9ff8cdcfdaf8cd671b3a2
Contents?: true
Size: 429 Bytes
Versions: 2
Compression:
Stored size: 429 Bytes
Contents
require 'nanotest' include Nanotest class Foo attr_accessor :bar end @foo = Foo.new assert { @foo.is_a?(Foo) } assert { @foo.respond_to?(:bar) } assert { @foo.bar.nil? } @foo.bar = 'a' @foo.bar << 'b' assert { @foo.bar == 'ab' } assert { not @foo.bar == 'xy' } @foo.bar = nil assert { @foo.bar == 'ab' } assert('boom') { false } __END__ output: .....FF (examples.rb:021) assertion failed (examples.rb:022) boom
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nanotest-0.9.4.1 | examples.rb |
nanotest-0.9.4 | examples.rb |