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");
  }

});