Skip to content

Commit

Permalink
Kill Ecto.Model references
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Jan 6, 2016
1 parent 4d3fe5b commit 1b858cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions installer/templates/ecto/model_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ defmodule <%= application_module %>.ModelCase do
using do
quote do
alias <%= application_module %>.Repo
import Ecto.Model
import Ecto.Query, only: [from: 2]

import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
import <%= application_module %>.ModelCase
end
end
Expand Down
5 changes: 3 additions & 2 deletions installer/templates/new/test/support/channel_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ defmodule <%= application_module %>.ChannelCase do
use Phoenix.ChannelTest
<%= if ecto do %>
alias <%= application_module %>.Repo
import Ecto.Model
import Ecto.Query, only: [from: 2]
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
<% end %>

# The default endpoint for testing
Expand Down
5 changes: 3 additions & 2 deletions installer/templates/new/test/support/conn_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ defmodule <%= application_module %>.ConnCase do
use Phoenix.ConnTest
<%= if ecto do %>
alias <%= application_module %>.Repo
import Ecto.Model
import Ecto.Query, only: [from: 2]
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
<% end %>
import <%= application_module %>.Router.Helpers

Expand Down

0 comments on commit 1b858cb

Please sign in to comment.