title: How to include directories while debugging and testing a gem
body: <p>Can anybody throw me a line?</p>
  
  <p>I'm having problems in tests implementation, concretely, while requiring files.</p>
  
  <p>I am developing a gem called mme_tools with a directory tree like this. The initial scaffold was generated using <em>jeweler</em>.</p>
  
  <pre><code>mme_tools
  |-- examples
  |   |-- demo_enumerable.rb
  |   `-- demo_print_debug.rb
  |-- Gemfile
  |-- Gemfile.lock
  |-- lib
  |   |-- mme_tools
  |   |   |-- concurrent.rb
  |   |   |-- debug.rb
  |   |   |-- enumerable.rb
  |   |   |-- version.rb
  |   |   `-- webparse.rb
  |   `-- mme_tools.rb
  |-- LICENSE.txt
  |-- Rakefile
  |-- README.rdoc
  `-- test
      `-- test_mme_tools.rb
  </code></pre>
  
  <p>where, <strong>mme_tools.rb</strong> is simply a container that requires all the files in <strong>mme_tools</strong> subdir (i.e. <code>require 'mme_tools/debug.rb'</code>). </p>
  
  <p>In the <strong>examples</strong> dir I can make some untidy tests (demos) as I progress. Simply putting a <code>require 'mme_tools'</code> at the top of each of those demos, and running ruby with option <code>-I../lib</code> works OK. In fact, I use Netbeans to develop so I include that option in every run.</p>
  
  <p>My problem arises while testing. At the top of <strong>test_mme_tools.rb</strong> I have</p>
  
  <pre><code>require 'test/unit'
  require 'mme_tools'
  </code></pre>
  
  <p>but my tests don't work because I think <strong>mme_tools.rb</strong> isn't found. The output from the rake task that I run from the shell is:</p>
  
  <pre><code>$ rake test
  rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
  /usr/bin/ruby1.8 -I"lib:lib:test" -I"/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib" "/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader.rb" "test/**/test_*.rb" 
  Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/rake_test_loader
  Started
  E
  Finished in 0.02176 seconds.
  
    1) Error:
  test_compose(TC_MMETools):
  NoMethodError: undefined method `compose' for MMETools::Enumerable:Module
      /mnt/dropbox/DESENVOLUPAMENT/Gems/mme_tools/test/test_mme_tools.rb:19:in `test_compose'
  
  1 tests, 0 assertions, 0 failures, 1 errors
  rake aborted!
  Command failed with status (1): [/usr/bin/ruby1.8 -I"lib:lib:test" -I"/usr/...]
  
  Tasks: TOP =&gt; test
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>Of course, from Netbeans occurs the same, exceptuating that it shows the full trace</p>
  
  <p>The file <strong>test_mme_tools.rb</strong> is as follows:</p>
  
  <pre><code>require 'test/unit'
  require 'mme_tools'
  
  class TC_MMETools &lt; Test::Unit::TestCase
  
    def setup
      @a=(1..12)
      @b=("A".."M")
      @c=%w{tantmateix adhuc nogensmenys urgell pocassolta carrincló bajanada casundena Massalcoreig}
    end
  
    def test_compose
      assert_equal [2,"B","adhuc"], MMETools::Enumerable.compose(@a,@b,@c)[1]
    end
  
  end
  </code></pre>
  
  <p>Any idea? </p>