Permalink
Browse files

Update examples file

  • Loading branch information...
1 parent 48e48b8 commit 903d3329eeb1f7705f4521fd33122edf914c9cc4 @mynyml committed Nov 27, 2009
Showing with 13 additions and 10 deletions.
  1. +1 −0 .gitignore
  2. +12 −10 examples.rb
View
@@ -1,3 +1,4 @@
doc/
pkg/
.yardoc
+*.gem
View
@@ -1,29 +1,31 @@
require 'nanotest'
-include NanoTest
+include Nanotest
class Foo
- attr_accessor :a
+ attr_accessor :bar
end
@foo = Foo.new
assert { @foo.is_a?(Foo) }
-assert { @foo.respond_to?(:a) }
-assert { @foo.a.nil? }
+assert { @foo.respond_to?(:bar) }
+assert { @foo.bar.nil? }
-@foo.a = 'a'
-@foo.a << 'b'
+@foo.bar = 'a'
+@foo.bar << 'b'
-assert { @foo.a == 'ab' }
+assert { @foo.bar == 'ab' }
+assert { not @foo.bar == 'xy' }
-@foo.a = nil
+@foo.bar = nil
-assert { @foo.a == 'a' }
+assert { @foo.bar == 'ab' }
assert('boom') { false }
__END__
output:
-....FF
+.....FF
(examples.rb:021) assertion failed
(examples.rb:022) boom
+

0 comments on commit 903d332

Please sign in to comment.