Skip to content

Commit 9c01f53

Browse files
add stream data dependency
1 parent 3716a4f commit 9c01f53

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.formatter.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
import_deps: [:ecto, :phoenix],
2+
import_deps: [:ecto, :phoenix, :stream_data],
33
inputs: ["*.{ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{ex,exs}"],
44
subdirectories: ["priv/*/migrations"]
55
]

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ defmodule PointingParty.MixProject do
4242
{:gettext, "~> 0.11"},
4343
{:jason, "~> 1.0"},
4444
{:plug_cowboy, "~> 2.0"},
45-
{:ex_machina, "~> 2.3", only: :test}
45+
{:ex_machina, "~> 2.3", only: :test},
46+
{:stream_data, "~> 0.1", only: :test}
4647
]
4748
end
4849
end

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"plug_crypto": {:hex, :plug_crypto, "1.0.0", "18e49317d3fa343f24620ed22795ec29d4a5e602d52d1513ccea0b07d8ea7d4d", [:mix], [], "hexpm"},
2222
"postgrex": {:hex, :postgrex, "0.14.3", "5754dee2fdf6e9e508cbf49ab138df964278700b764177e8f3871e658b345a1e", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
2323
"ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm"},
24+
"stream_data": {:hex, :stream_data, "0.4.3", "62aafd870caff0849a5057a7ec270fad0eb86889f4d433b937d996de99e3db25", [:mix], [], "hexpm"},
2425
"telemetry": {:hex, :telemetry, "0.4.0", "8339bee3fa8b91cb84d14c2935f8ecf399ccd87301ad6da6b71c09553834b2ab", [:rebar3], [], "hexpm"},
2526
}
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
defmodule PointingParty.VoteCalculatorTest do
22
use ExUnit.Case, async: true
3+
use ExUnitProperties
34

45
@users %{
56
"sean" => %{metas: [%{points: 1}]},
67
"michael" => %{metas: [%{points: 3}]},
78
"sophie" => %{metas: [%{points: 3}]}
89
}
910

10-
test "winning_vote/1 calculates the card estimate from the votes" do
11-
winning = PointingParty.VoteCalculator.winning_vote(@users)
12-
assert winning == 3
11+
describe "winning_vote/1" do
12+
test "calculates the card estimate from the votes" do
13+
winning = PointingParty.VoteCalculator.winning_vote(@users)
14+
assert winning == 3
15+
end
1316
end
1417
end

0 commit comments

Comments
 (0)