/* jshint ignore:start */

/* jshint ignore:end */

define('dummy/app', ['exports', 'ember', 'ember/resolver', 'ember/load-initializers', 'dummy/config/environment'], function (exports, Ember, Resolver, loadInitializers, config) {

  'use strict';

  Ember['default'].MODEL_FACTORY_INJECTIONS = true;

  var App = Ember['default'].Application.extend({
    modulePrefix: config['default'].modulePrefix,
    podModulePrefix: config['default'].podModulePrefix,
    Resolver: Resolver['default']
  });

  loadInitializers['default'](App, config['default'].modulePrefix);

  exports['default'] = App;

});
define('dummy/ember-cli-copyable/tests/modules/ember-cli-copyable/index.jshint', function () {

  'use strict';

  module("JSHint - modules/ember-cli-copyable");
  test("modules/ember-cli-copyable/index.js should pass jshint", function () {
    ok(true, "modules/ember-cli-copyable/index.js should pass jshint.");
  });

});
define('dummy/ember-cli-copyable/tests/modules/ember-cli-copyable/mixins/copyable.jshint', function () {

  'use strict';

  module("JSHint - modules/ember-cli-copyable/mixins");
  test("modules/ember-cli-copyable/mixins/copyable.js should pass jshint", function () {
    ok(true, "modules/ember-cli-copyable/mixins/copyable.js should pass jshint.");
  });

});
define('dummy/initializers/app-version', ['exports', 'dummy/config/environment', 'ember'], function (exports, config, Ember) {

  'use strict';

  var classify = Ember['default'].String.classify;

  exports['default'] = {
    name: "App Version",
    initialize: function initialize(container, application) {
      var appName = classify(application.toString());
      Ember['default'].libraries.register(appName, config['default'].APP.version);
    }
  };

});
define('dummy/initializers/export-application-global', ['exports', 'ember', 'dummy/config/environment'], function (exports, Ember, config) {

  'use strict';

  exports.initialize = initialize;

  function initialize(container, application) {
    var classifiedName = Ember['default'].String.classify(config['default'].modulePrefix);

    if (config['default'].exportApplicationGlobal && !window[classifiedName]) {
      window[classifiedName] = application;
    }
  }

  ;

  exports['default'] = {
    name: "export-application-global",

    initialize: initialize
  };

});
define('dummy/router', ['exports', 'ember', 'dummy/config/environment'], function (exports, Ember, config) {

  'use strict';

  var Router = Ember['default'].Router.extend({
    location: config['default'].locationType
  });

  Router.map(function () {});

  exports['default'] = Router;

});
define('dummy/templates/application', ['exports'], function (exports) {

  'use strict';

  exports['default'] = Ember.HTMLBars.template((function() {
    return {
      isHTMLBars: true,
      blockParams: 0,
      cachedFragment: null,
      hasRendered: false,
      build: function build(dom) {
        var el0 = dom.createDocumentFragment();
        var el1 = dom.createElement("h2");
        dom.setAttribute(el1,"id","title");
        var el2 = dom.createTextNode("Welcome to Ember.js");
        dom.appendChild(el1, el2);
        dom.appendChild(el0, el1);
        var el1 = dom.createTextNode("\n\n");
        dom.appendChild(el0, el1);
        var el1 = dom.createTextNode("\n");
        dom.appendChild(el0, el1);
        return el0;
      },
      render: function render(context, env, contextualElement) {
        var dom = env.dom;
        var hooks = env.hooks, content = hooks.content;
        dom.detectNamespace(contextualElement);
        var fragment;
        if (env.useFragmentCache && dom.canClone) {
          if (this.cachedFragment === null) {
            fragment = this.build(dom);
            if (this.hasRendered) {
              this.cachedFragment = fragment;
            } else {
              this.hasRendered = true;
            }
          }
          if (this.cachedFragment) {
            fragment = dom.cloneNode(this.cachedFragment, true);
          }
        } else {
          fragment = this.build(dom);
        }
        var morph0 = dom.createMorphAt(fragment,1,2,contextualElement);
        content(env, morph0, context, "outlet");
        return fragment;
      }
    };
  }()));

});
define('dummy/tests/app.jshint', function () {

  'use strict';

  module('JSHint - .');
  test('app.js should pass jshint', function() { 
    ok(true, 'app.js should pass jshint.'); 
  });

});
define('dummy/tests/helpers/fabricate', ['exports', 'ember-data', 'ember-cli-copyable'], function (exports, DS, Copyable) {

  'use strict';



  exports['default'] = fabricate;
  var setupModels = function setupModels(app, async) {
    app.Foo = DS['default'].Model.extend(Copyable['default'], {
      property: DS['default'].attr("string")
    });

    app.Bar = DS['default'].Model.extend(Copyable['default'], {
      foo: DS['default'].belongsTo("foo", { async: async })
    });

    app.Baz = DS['default'].Model.extend(Copyable['default'], {
      foos: DS['default'].hasMany("foo", { async: async }),
      bar: DS['default'].belongsTo("bar", { async: async })
    });

    app.Multi = DS['default'].Model.extend(Copyable['default'], {
      bars: DS['default'].hasMany("bar", { async: async }),
      baz: DS['default'].belongsTo("baz", { async: async })
    });

    app.FooFix = DS['default'].Model.extend({
      property: DS['default'].attr("string")
    });

    app.FooBar = DS['default'].Model.extend(Copyable['default'], {
      fooFix: DS['default'].belongsTo("fooFix", { async: async })
    });
  };

  var setupFixtures = function setupFixtures(app) {
    app.Foo.reopenClass({
      FIXTURES: [{
        id: "1",
        property: "prop1"
      }, {
        id: "2",
        property: "prop2"
      }, {
        id: "3",
        property: "prop3"
      }]
    });

    app.Bar.reopenClass({
      FIXTURES: [{
        id: "1",
        foo: "1"
      }]
    });

    app.Baz.reopenClass({
      FIXTURES: [{
        id: "1",
        foos: ["1", "2"],
        bar: "1"
      }, {
        id: "2",
        foos: ["3"],
        bar: "1"
      }]
    });

    app.Multi.reopenClass({
      FIXTURES: [{
        id: "1",
        bars: ["1"],
        baz: "1"
      }, {
        id: "2",
        bars: [],
        baz: "1"
      }]
    });

    app.FooFix.reopenClass({
      FIXTURES: [{
        id: "1",
        property: "fix1"
      }]
    });

    app.FooBar.reopenClass({
      FIXTURES: [{
        id: "1",
        fooFix: "1"
      }]
    });
  };
  function fabricate(app, async) {

    setupModels(app, async);
    setupFixtures(app);
    app.ApplicationAdapter = DS['default'].FixtureAdapter;
    return app.__container__.lookup("store:main");
  }

});
define('dummy/tests/helpers/fabricate.jshint', function () {

  'use strict';

  module('JSHint - helpers');
  test('helpers/fabricate.js should pass jshint', function() { 
    ok(true, 'helpers/fabricate.js should pass jshint.'); 
  });

});
define('dummy/tests/helpers/resolver', ['exports', 'ember/resolver', 'dummy/config/environment'], function (exports, Resolver, config) {

  'use strict';

  var resolver = Resolver['default'].create();

  resolver.namespace = {
    modulePrefix: config['default'].modulePrefix,
    podModulePrefix: config['default'].podModulePrefix
  };

  exports['default'] = resolver;

});
define('dummy/tests/helpers/resolver.jshint', function () {

  'use strict';

  module('JSHint - helpers');
  test('helpers/resolver.js should pass jshint', function() { 
    ok(true, 'helpers/resolver.js should pass jshint.'); 
  });

});
define('dummy/tests/helpers/start-app', ['exports', 'ember', 'dummy/app', 'dummy/router', 'dummy/config/environment'], function (exports, Ember, Application, Router, config) {

  'use strict';



  exports['default'] = startApp;
  function startApp(attrs) {
    var application;

    var attributes = Ember['default'].merge({}, config['default'].APP);
    attributes = Ember['default'].merge(attributes, attrs); // use defaults, but you can override;

    Ember['default'].run(function () {
      application = Application['default'].create(attributes);
      application.setupForTesting();
      application.injectTestHelpers();
    });

    return application;
  }

});
define('dummy/tests/helpers/start-app.jshint', function () {

  'use strict';

  module('JSHint - helpers');
  test('helpers/start-app.js should pass jshint', function() { 
    ok(true, 'helpers/start-app.js should pass jshint.'); 
  });

});
define('dummy/tests/router.jshint', function () {

  'use strict';

  module('JSHint - .');
  test('router.js should pass jshint', function() { 
    ok(true, 'router.js should pass jshint.'); 
  });

});
define('dummy/tests/test-helper', ['dummy/tests/helpers/resolver', 'ember-qunit'], function (resolver, ember_qunit) {

	'use strict';

	ember_qunit.setResolver(resolver['default']);

});
define('dummy/tests/test-helper.jshint', function () {

  'use strict';

  module('JSHint - .');
  test('test-helper.js should pass jshint', function() { 
    ok(true, 'test-helper.js should pass jshint.'); 
  });

});
define('dummy/tests/unit/async-copying-test', ['ember', 'ember-qunit', 'qunit', 'dummy/tests/helpers/start-app', 'dummy/tests/helpers/fabricate'], function (Ember, ember_qunit, qunit, startApp, fabricate) {

  'use strict';

  var store;

  qunit.module("async copying", {
    beforeEach: function beforeEach() {
      store = fabricate['default'](startApp['default'](), true);
    }
  });

  ember_qunit.test("it overwrites attributes", function (assert) {
    assert.expect(1);

    return Ember['default'].run(function () {
      return store.find("foo", "1").then(function (foo) {
        return foo.copy({ property: "custom" }).then(function (copy) {
          assert.equal(copy.get("property"), "custom");
        });
      });
    });
  });

  ember_qunit.test("it shallow copies relation", function (assert) {
    assert.expect(1);

    return Ember['default'].run(function () {
      return store.find("fooBar", "1").then(function (fooBar) {

        return fooBar.copy().then(function (copy) {
          assert.equal(copy.get("fooFix.id"), "1");
        });
      });
    });
  });

  ember_qunit.test("it copies belongsTo relation", function (assert) {
    assert.expect(2);

    return Ember['default'].run(function () {
      return store.find("bar", "1").then(function (bar) {

        return bar.copy().then(function (copy) {
          assert.notEqual(copy.get("foo.id"), bar.get("foo.id"));
          assert.equal(copy.get("foo.property"), "prop1");
        });
      });
    });
  });

  ember_qunit.test("it copies hasMany relation", function (assert) {
    assert.expect(5);

    return Ember['default'].run(function () {
      return store.find("baz", "1").then(function (baz) {

        return baz.copy().then(function (copy) {
          assert.equal(copy.get("foos.length"), 2);
          assert.notEqual(copy.get("foos.firstObject.id"), "1");
          assert.notEqual(copy.get("foos.lastObject.id"), "2");
          assert.equal(copy.get("foos.firstObject.property"), "prop1");
          assert.equal(copy.get("foos.lastObject.property"), "prop2");
        });
      });
    });
  });

  ember_qunit.test("it copies complex objects", function (assert) {
    assert.expect(6);

    return Ember['default'].run(function () {
      return store.find("multi", "1").then(function (multi) {

        return multi.copy().then(function (copy) {
          assert.notEqual(copy.get("bars.firstObject.id"), "1");
          assert.notEqual(copy.get("bars.firstObject.foo.id"), "1");
          assert.equal(copy.get("bars.firstObject.foo.property"), "prop1");
          assert.notEqual(copy.get("baz.id"), "1");
          assert.notEqual(copy.get("baz.foos.lastObject.id"), "2");
          assert.equal(copy.get("baz.foos.lastObject.property"), "prop2");
        });
      });
    });
  });

  ember_qunit.test("it overwrites relations", function (assert) {
    assert.expect(2);

    return Ember['default'].run(function () {
      return store.find("baz", "2").then(function (myBaz) {
        return store.find("multi", "1").then(function (multi) {

          return multi.copy({ baz: myBaz, bars: [] }).then(function (copy) {
            assert.equal(copy.get("bars.length"), 0);
            assert.equal(copy.get("baz.foos.length"), 1);
          });
        });
      });
    });
  });

  ember_qunit.test("it passes options to relations", function (assert) {
    assert.expect(2);

    return Ember['default'].run(function () {
      return store.find("multi", "1").then(function (multi) {

        return multi.copy({ baz: { bar: { foo: { property: "asdf" } } } }).then(function (copy) {
          assert.equal(copy.get("bars.firstObject.foo.property"), "prop1");
          assert.equal(copy.get("baz.bar.foo.property"), "asdf");
        });
      });
    });
  });

  ember_qunit.test("it copies empty objects", function (assert) {
    assert.expect(3);

    return Ember['default'].run(function () {
      return store.find("multi", "2").then(function (multi) {

        return multi.copy().then(function (copy) {
          assert.notEqual(copy.get("id"), "2");
          assert.equal(copy.get("bars.length"), 0);
          assert.equal(copy.get("baz.foos.firstObject.property"), "prop1");
        });
      });
    });
  });

});
define('dummy/tests/unit/async-copying-test.jshint', function () {

  'use strict';

  module('JSHint - unit');
  test('unit/async-copying-test.js should pass jshint', function() { 
    ok(true, 'unit/async-copying-test.js should pass jshint.'); 
  });

});
define('dummy/tests/unit/sync-copying-test', ['ember', 'ember-qunit', 'qunit', 'dummy/tests/helpers/start-app', 'dummy/tests/helpers/fabricate'], function (Ember, ember_qunit, qunit, startApp, fabricate) {

  'use strict';

  var store;

  qunit.module("sync copying", {
    beforeEach: function beforeEach() {
      store = fabricate['default'](startApp['default'](), false);

      return Ember['default'].RSVP.all(["foo", "bar", "baz", "multi", "fooBar", "fooFix"].map(function (type) {
        return store.find(type);
      }));
    }
  });

  ember_qunit.test("it excludes attributes", function (assert) {
    assert.expect(1);

    var foo = store.getById("foo", "1");
    return Ember['default'].run(function () {
      return foo.copy({ property: null }).then(function (copy) {
        assert.equal(copy.get("property"), null);
      });
    });
  });

  ember_qunit.test("it shallow copies relation", function (assert) {
    assert.expect(1);

    var fooBar = store.getById("fooBar", "1");
    return Ember['default'].run(function () {
      return fooBar.copy().then(function (copy) {
        assert.equal(copy.get("fooFix.id"), "1");
      });
    });
  });

  ember_qunit.test("it copies belongsTo relation", function (assert) {
    assert.expect(2);

    var bar = store.getById("bar", "1");
    return Ember['default'].run(function () {
      return bar.copy().then(function (copy) {
        assert.notEqual(copy.get("foo.id"), bar.get("foo.id"));
        assert.equal(copy.get("foo.property"), "prop1");
      });
    });
  });

  ember_qunit.test("it copies hasMany relation", function (assert) {
    assert.expect(5);

    var baz = store.getById("baz", "1");
    return Ember['default'].run(function () {
      return baz.copy().then(function (copy) {
        assert.equal(copy.get("foos.length"), 2);
        assert.notEqual(copy.get("foos.firstObject.id"), "1");
        assert.notEqual(copy.get("foos.lastObject.id"), "2");
        assert.equal(copy.get("foos.firstObject.property"), "prop1");
        assert.equal(copy.get("foos.lastObject.property"), "prop2");
      });
    });
  });

  ember_qunit.test("it copies complex objects", function (assert) {
    assert.expect(6);

    var multi = store.getById("multi", "1");
    return Ember['default'].run(function () {
      return multi.copy().then(function (copy) {
        assert.notEqual(copy.get("bars.firstObject.id"), "1");
        assert.notEqual(copy.get("bars.firstObject.foo.id"), "1");
        assert.equal(copy.get("bars.firstObject.foo.property"), "prop1");
        assert.notEqual(copy.get("baz.id"), "1");
        assert.notEqual(copy.get("baz.foos.lastObject.id"), "2");
        assert.equal(copy.get("baz.foos.lastObject.property"), "prop2");
      });
    });
  });

  ember_qunit.test("it overwrites relations", function (assert) {
    assert.expect(2);

    var multi = store.getById("multi", "1");
    var myBaz = store.getById("baz", "2");
    return Ember['default'].run(function () {
      return multi.copy({ baz: myBaz, bars: [] }).then(function (copy) {
        assert.equal(copy.get("bars.length"), 0);
        assert.equal(copy.get("baz.foos.length"), myBaz.get("foos.length"));
      });
    });
  });

  ember_qunit.test("it excludes relations", function (assert) {
    assert.expect(2);

    var multi = store.getById("multi", "1");
    return Ember['default'].run(function () {
      return multi.copy({ baz: null }).then(function (copy) {
        assert.equal(copy.get("bars.firstObject.foo.property"), "prop1");
        assert.equal(copy.get("baz"), null);
      });
    });
  });

  ember_qunit.test("it copies empty objects", function (assert) {
    assert.expect(3);

    var multi = store.getById("multi", "2");
    return Ember['default'].run(function () {
      return multi.copy().then(function (copy) {
        assert.notEqual(copy.get("id"), "2");
        assert.equal(copy.get("bars.length"), 0);
        assert.equal(copy.get("baz.foos.firstObject.property"), "prop1");
      });
    });
  });

});
define('dummy/tests/unit/sync-copying-test.jshint', function () {

  'use strict';

  module('JSHint - unit');
  test('unit/sync-copying-test.js should pass jshint', function() { 
    ok(true, 'unit/sync-copying-test.js should pass jshint.'); 
  });

});
/* jshint ignore:start */

/* jshint ignore:end */

/* jshint ignore:start */

define('dummy/config/environment', ['ember'], function(Ember) {
  var prefix = 'dummy';
/* jshint ignore:start */

try {
  var metaName = prefix + '/config/environment';
  var rawConfig = Ember['default'].$('meta[name="' + metaName + '"]').attr('content');
  var config = JSON.parse(unescape(rawConfig));

  return { 'default': config };
}
catch(err) {
  throw new Error('Could not read config from meta tag with name "' + metaName + '".');
}

/* jshint ignore:end */

});

if (runningTests) {
  require("dummy/tests/test-helper");
} else {
  require("dummy/app")["default"].create({"LOG_ACTIVE_GENERATION":false,"LOG_VIEW_LOOKUPS":false,"rootElement":"#ember-testing","name":"ember-cli-copyable","version":"0.9.2.345db45a"});
}

/* jshint ignore:end */
//# sourceMappingURL=dummy.map