Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sloane Perrault committed Jul 2, 2023
1 parent db5e754 commit 5bf8b50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/type_id.ex
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ defmodule TypeID do
[suffix] ->
from!("", suffix)

_ ->
_ ->
raise ArgumentError, "invalid TypeID"
end
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule TypeID.MixProject do
def project do
[
app: :typeid_elixir,
version: "0.0.1",
version: "0.1.0",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
description: description(),
Expand Down
11 changes: 6 additions & 5 deletions test/spec_test.exs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
defmodule TypeID.SpecTest do
use ExUnit.Case

specs_path = :code.priv_dir(:typeid_elixir)
|> Path.join("/spec")
specs_path =
:code.priv_dir(:typeid_elixir)
|> Path.join("/spec")

@valid_specs specs_path
|> Path.join("/valid.yml")
|> YamlElixir.read_from_file!()

@invalid_specs specs_path
|> Path.join("/invalid.yml")
|> YamlElixir.read_from_file!()
|> Path.join("/invalid.yml")
|> YamlElixir.read_from_file!()

describe "valid" do
for %{"name" => name, "typeid" => typeid, "prefix" => prefix, "uuid" => uuid} <- @valid_specs do
Expand All @@ -23,7 +24,7 @@ defmodule TypeID.SpecTest do
end

describe "invalid" do
for %{"name" => name, "typeid" => typeid, "description" => desc } <- @invalid_specs do
for %{"name" => name, "typeid" => typeid, "description" => desc} <- @invalid_specs do
test "#{name}: #{desc}" do
assert :error = TypeID.from_string(unquote(typeid))
end
Expand Down

0 comments on commit 5bf8b50

Please sign in to comment.