title: Having trouble unit testing a helper from an addon project
body: <p><a href="https://github.com/stefanpenner/ember-cli/issues/2421" rel="nofollow">https://github.com/stefanpenner/ember-cli/issues/2421</a></p>
  
  <p>ember-cli: 1.2</p>
  
  <p>I have a boilerplate <em>addon</em> project that has a title-case helper as follows:</p>
  
  <p>My Helper <code>app/helpers/title-case.js</code></p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Handlebars.makeBoundHelper(function(string) {
  
      if (typeof string === 'string') {
          //replace dashes with spaces
          var str = string.dasherize().replace(/-/g, ' ');
  
          return str.replace(/\w\S*/g, function(word){
              return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase();
          });
      } else {
          return string;
      }
  
  });
  </code></pre>
  
  <p>I Generated the test for the helper using ember-cli</p>
  
  <pre><code>ember g helper-test title-case
  </code></pre>
  
  <p>This was the output:</p>
  
  <pre><code>import {
    titleCase
  } from 'boilerplate/helpers/title-case';
  
  module('TitleCaseHelper');
  
  // Replace this with your real tests.
  test('it works', function() {
    var result = titleCase(42);
    ok(result);
  });
  </code></pre>
  
  <p>Now running tests from ember-cli</p>
  
  <pre><code>ember test
  </code></pre>
  
  <p>Getting the following error:</p>
  
  <pre><code>Build failed.
  File: dummy/tests/unit/helpers/title-case-test.js
  ENOENT, no such file or directory '/home/me/git/ember/boilerplate/tmp/tree_merger-tmp_dest_dir-PL6HFkuw.tmp/boilerplate/helpers/title-case.js'
  Error: ENOENT, no such file or directory '/home/me/git/ember/boilerplate/tmp/tree_merger-tmp_dest_dir-PL6HFkuw.tmp/boilerplate/helpers/title-case.js'
  </code></pre>
  
  <h2>UPDATE</h2>
  
  <p>I tried changing the following to "dummy" instead of the autogenerated "boilerplate" and removed the curly brackets.</p>
  
  <pre><code>//import {
  //  titleCase
  //} from 'dummy/helpers/title-case';
  import titleCase from 'dummy/helpers/title-case';
  </code></pre>
  
  <p>it gets further now and into the test method but failed when calling <code>titleCase(42)</code> with:</p>
  
  <pre><code>TypeError: Cannot read property 'isUnbound' of undefined
  </code></pre>
  
  <h2>UPDATE #2</h2>
  
  <p>I was able to get this working but it is ugly, I needed to access the <code>._rawFunction</code> property and change the format of the import statement.</p>
  
  <pre><code>import titleCaseHelper from 'dummy/helpers/title-case';
  
  var titleCase = titleCaseHelper._rawFunction;
  module('TitleCaseHelper');
  
  test('Title case lower case letters', function() {
        var result = titleCase('hello world');
        equal(result, 'Hello World');
  });
  </code></pre>
  
  <p>I am still confused as to why the original generated test by ember-cli didn't work.</p>