title: Ruby: undefined method `assert'
body: <p>I follow this code on codeschool</p>
  
  <p><strong>string_extension_test.rb</strong></p>
  
  <pre><code>gem "minitest", "~&gt; 4.0"
  require "test/unit"
  require "string_extension"
  
  assert "3".is_number?
  assert !"Blash".is_number?
  </code></pre>
  
  <p><strong>string_extension.rb</strong></p>
  
  <pre><code>class String 
      def is_number?
          if self =~/^\d+$/
              true
          else
              false
          end
      end
  end
  </code></pre>
  
  <p>And I type <code>ruby -I. string_extension_test.rb</code></p>
  
  <p>However, it shows that </p>
  
  <pre><code>string_extension_test.rb:6:in `&lt;main&gt;': undefined method `assert' for main:Object (NoMethodError)
  </code></pre>
  
  <p>I have tried add <code>include Test::Unit::Assertions</code> in <strong>string_extension_test.rb</strong>, it can pass, but no test case. </p>
  
  <p>the output will be </p>
  
  <pre><code>Finished tests in 0.013038s, 0.0000 tests/s, 0.0000 assertions/s.
  0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
  </code></pre>