{"action":"created","issue":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/81","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/81/comments","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/81/events","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/81","id":66679818,"number":81,"title":"Server is undefined while in test environment","user":{"login":"alvincrespo","id":151311,"avatar_url":"https://avatars.githubusercontent.com/u/151311?v=3","gravatar_id":"","url":"https://api.github.com/users/alvincrespo","html_url":"https://github.com/alvincrespo","followers_url":"https://api.github.com/users/alvincrespo/followers","following_url":"https://api.github.com/users/alvincrespo/following{/other_user}","gists_url":"https://api.github.com/users/alvincrespo/gists{/gist_id}","starred_url":"https://api.github.com/users/alvincrespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvincrespo/subscriptions","organizations_url":"https://api.github.com/users/alvincrespo/orgs","repos_url":"https://api.github.com/users/alvincrespo/repos","events_url":"https://api.github.com/users/alvincrespo/events{/privacy}","received_events_url":"https://api.github.com/users/alvincrespo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-04-06T18:59:44Z","updated_at":"2015-05-08T07:04:50Z","closed_at":"2015-04-07T02:20:18Z","body":"**First and foremost, thanks for writing up this addon! It is such a great addition to the community.**\r\n\r\n**Problem**\r\nWhen running tests at [http://localhost:4200/tests](http://localhost:4200/tests) I'm getting `ReferenceError: server is not defined`. Not sure exactly how this might be happening since I've enabled ember-cli-mirage for testing mode only.\r\n\r\n_Note_: This error does not occur when running `ember test`\r\n\r\n![](https://s3.amazonaws.com/f.cl.ly/items/0F3c35031N1J2Y3s2x36/Screen%20Shot%202015-04-06%20at%202.53.57%20PM.png)\r\n\r\n**config/environment.js**\r\n\r\n```\r\nmodule.exports = function(environment) {\r\n  var ENV = {\r\n    modulePrefix: 'cio',\r\n    environment: environment,\r\n    baseURL: '/',\r\n    locationType: 'auto',\r\n    EmberENV: {\r\n      FEATURES: {}\r\n    },\r\n\r\n    APP: {}\r\n  };\r\n\r\n  ENV.APP.FORCE_REST_ADAPTER = false\r\n  ENV.APP.PROFILE_RENDERS = false\r\n  // Disable ember-cli-mirage by default, we want to use our local api for development\r\n  ENV['ember-cli-mirage'] = {\r\n    enabled: false\r\n  };\r\n\r\n  if (environment === 'development') {}\r\n\r\n  if (environment === 'production') {}\r\n\r\n  if (environment === 'test') {\r\n    ENV['ember-cli-mirage'] = {\r\n      enabled: true\r\n    };\r\n\r\n    // Root Element\r\n    ENV.APP.rootElement = '#ember-testing';\r\n\r\n    // Testem prefers this...\r\n    ENV.baseURL = '/';\r\n    ENV.locationType = 'none';\r\n\r\n    // keep test console output quieter\r\n    ENV.APP.LOG_ACTIVE_GENERATION = false;\r\n    ENV.APP.LOG_VIEW_LOOKUPS = false;\r\n\r\n    ENV.APP.rootElement = '#ember-testing';\r\n  }\r\n\r\n  return ENV;\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments/100128484","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/81#issuecomment-100128484","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/81","id":100128484,"user":{"login":"ballPointPenguin","id":35609,"avatar_url":"https://avatars.githubusercontent.com/u/35609?v=3","gravatar_id":"","url":"https://api.github.com/users/ballPointPenguin","html_url":"https://github.com/ballPointPenguin","followers_url":"https://api.github.com/users/ballPointPenguin/followers","following_url":"https://api.github.com/users/ballPointPenguin/following{/other_user}","gists_url":"https://api.github.com/users/ballPointPenguin/gists{/gist_id}","starred_url":"https://api.github.com/users/ballPointPenguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballPointPenguin/subscriptions","organizations_url":"https://api.github.com/users/ballPointPenguin/orgs","repos_url":"https://api.github.com/users/ballPointPenguin/repos","events_url":"https://api.github.com/users/ballPointPenguin/events{/privacy}","received_events_url":"https://api.github.com/users/ballPointPenguin/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T07:04:50Z","updated_at":"2015-05-08T07:04:50Z","body":"This hasn't really bothered me enough to isolate yet. Overall, I am very happy how awesome everything is. :hamster: "}}