Skip to content

Commit

Permalink
Use elixir 1.3 describe for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drewolson committed Jun 21, 2016
1 parent 26fd30c commit d22d894
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ defmodule Scrivener.Ecto.Mixfile do
{:dialyxir, "~> 0.3.0", only: :dev},
{:earmark, ">= 0.0.0", only: :dev},
{:ex_doc, "~> 0.11.0", only: :dev},
{:ex_spec, "~> 1.0", only: :test},
{:postgrex, "~> 0.11.2", optional: true}
]
end
Expand Down
22 changes: 11 additions & 11 deletions test/scrivener/paginator/ecto/query_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

describe "paginate" do
it "paginates an unconstrained query" do
test "paginates an unconstrained query" do
create_posts

page = Post |> Scrivener.Ecto.Repo.paginate
Expand All @@ -47,7 +47,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "uses defaults from the repo" do
test "uses defaults from the repo" do
posts = create_posts

page =
Expand All @@ -62,7 +62,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "removes invalid clauses before counting total pages" do
test "removes invalid clauses before counting total pages" do
posts = create_posts

page =
Expand All @@ -77,7 +77,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "can be provided the current page and page size as a params map" do
test "can be provided the current page and page size as a params map" do
posts = create_posts

page =
Expand All @@ -91,7 +91,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "can be provided the current page and page size as options" do
test "can be provided the current page and page size as options" do
posts = create_posts

page =
Expand All @@ -105,7 +105,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "will respect the max_page_size configuration" do
test "will respect the max_page_size configuration" do
page =
Post
|> Post.published
Expand All @@ -114,7 +114,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.page_size == 10
end

it "can be used on a table with any primary key" do
test "can be used on a table with any primary key" do
create_key_values

page =
Expand All @@ -126,7 +126,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 3
end

it "can be used with a group by clause" do
test "can be used with a group by clause" do
create_posts

page =
Expand All @@ -138,7 +138,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_entries == 7
end

it "can be provided a Scrivener.Config directly" do
test "can be provided a Scrivener.Config directly" do
posts = create_posts

config = %Scrivener.Config{
Expand All @@ -158,7 +158,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "can be provided a keyword directly" do
test "can be provided a keyword directly" do
posts = create_posts

page =
Expand All @@ -172,7 +172,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
assert page.total_pages == 2
end

it "can be provided a map directly" do
test "can be provided a map directly" do
posts = create_posts

page =
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Scrivener.Ecto.TestCase do

using(opts) do
quote do
use ExSpec, unquote(opts)
use ExUnit.Case, unquote(opts)
import Ecto.Query
end
end
Expand Down

0 comments on commit d22d894

Please sign in to comment.