Skip to content

Commit a97c300

Browse files
committed
correct tests
1 parent eabb008 commit a97c300

File tree

7 files changed

+48
-48
lines changed

7 files changed

+48
-48
lines changed

lib/faker.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ defmodule Faker do
4747
acc
4848
end
4949

50-
@alphabet 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
50+
@alphabet ~c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
5151
defp letter do
5252
Enum.at(@alphabet, random_between(0, Enum.count(@alphabet) - 1))
5353
end

lib/faker/address.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Faker.Address do
33

44
alias Faker.Person
55

6-
@geobase32 '0123456789bcdefghjkmnpqrstuvwxyz'
6+
@geobase32 ~c"0123456789bcdefghjkmnpqrstuvwxyz"
77

88
@moduledoc """
99
Functions for generating addresses.

lib/faker/address/pt_br.ex

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ defmodule Faker.Address.PtBr do
3434
## Examples
3535
3636
iex> Faker.Address.PtBr.city()
37-
"Senador Kaique Paulista"
37+
"Senador Suélen das Pedras"
3838
iex> Faker.Address.PtBr.city()
39-
"São Roberta dos Dourados"
39+
"São Pedro Lucas do Sul"
4040
iex> Faker.Address.PtBr.city()
41-
"Salto das Flores"
41+
"Três Pedro Henrique"
4242
iex> Faker.Address.PtBr.city()
43-
"Kléber"
43+
"João Gabriel Alegre"
4444
"""
4545
@spec city() :: String.t()
4646
def city do
@@ -1034,13 +1034,13 @@ defmodule Faker.Address.PtBr do
10341034
## Examples
10351035
10361036
iex> Faker.Address.PtBr.street_address()
1037-
"Estação Kaique, 2"
1037+
"Estação Suélen, 646"
10381038
iex> Faker.Address.PtBr.street_address()
1039-
"Lagoa Matheus, 0832"
1039+
"Recanto Arthur, 970"
10401040
iex> Faker.Address.PtBr.street_address()
1041-
"Estrada Diegues, s/n"
1041+
"Trecho Júlia Viana, s/n"
10421042
iex> Faker.Address.PtBr.street_address()
1043-
"Praia Limeira, 020"
1043+
"Passarela Morais, s/n"
10441044
"""
10451045
@spec street_address() :: String.t()
10461046
def street_address do
@@ -1053,13 +1053,13 @@ defmodule Faker.Address.PtBr do
10531053
## Examples
10541054
10551055
iex> Faker.Address.PtBr.street_address(true)
1056-
"Estação Kaique, 2 Sala 461"
1056+
"Estação Suélen, 646 AP 083"
10571057
iex> Faker.Address.PtBr.street_address(false)
1058-
"Conjunto Rodrigo, 970"
1058+
"Setor da Penha, s/n"
10591059
iex> Faker.Address.PtBr.street_address(false)
1060-
"Trecho Davi Luiz Limeira, 020"
1060+
"Trecho Júlia Viana, s/n"
10611061
iex> Faker.Address.PtBr.street_address(false)
1062-
"Sítio Maria Eduarda, 097"
1062+
"Passarela Morais, s/n"
10631063
"""
10641064
@spec street_address(true | any) :: String.t()
10651065
def street_address(true), do: street_address() <> " " <> secondary_address()
@@ -1071,13 +1071,13 @@ defmodule Faker.Address.PtBr do
10711071
## Examples
10721072
10731073
iex> Faker.Address.PtBr.street_name()
1074-
"Estação Kaique"
1074+
"Estação Suélen"
10751075
iex> Faker.Address.PtBr.street_name()
1076-
"Morro Louise Macieira"
1076+
"Colônia Macieira"
10771077
iex> Faker.Address.PtBr.street_name()
1078-
"Loteamento Maria Alice Junqueira"
1078+
"Loteamento Emanuel Albuquerque"
10791079
iex> Faker.Address.PtBr.street_name()
1080-
"Condomínio da Maia"
1080+
"Setor da Penha"
10811081
"""
10821082
@spec street_name() :: String.t()
10831083
def street_name do

lib/faker/file.ex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ defmodule Faker.File do
3939
## Examples
4040
4141
iex> Faker.File.file_extension()
42-
"wav"
42+
"txt"
4343
iex> Faker.File.file_extension()
44-
"wav"
44+
"html"
4545
iex> Faker.File.file_extension()
46-
"doc"
46+
"flac"
4747
iex> Faker.File.file_extension()
48-
"mov"
48+
"odt"
4949
"""
5050
@spec file_extension() :: String.t()
5151
def file_extension do
@@ -84,11 +84,11 @@ defmodule Faker.File do
8484
iex> Faker.File.file_name()
8585
"aliquam.jpg"
8686
iex> Faker.File.file_name()
87-
"deleniti.doc"
87+
"deleniti.flac"
8888
iex> Faker.File.file_name()
8989
"qui.jpg"
9090
iex> Faker.File.file_name()
91-
"quibusdam.csv"
91+
"quibusdam.webm"
9292
"""
9393
@spec file_name() :: String.t()
9494
def file_name do
@@ -121,13 +121,13 @@ defmodule Faker.File do
121121
## Examples
122122
123123
iex> Faker.File.mime_type()
124-
"text/css"
124+
"model/mesh"
125125
iex> Faker.File.mime_type()
126-
"message/http"
126+
"image/tiff"
127127
iex> Faker.File.mime_type()
128-
"application/ogg"
128+
"message/partial"
129129
iex> Faker.File.mime_type()
130-
"model/x3d+xml"
130+
"audio/webm"
131131
"""
132132
@spec mime_type :: String.t()
133133
def mime_type do

lib/faker/lorem.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ defmodule Faker.Lorem do
498498
end
499499

500500
defp character do
501-
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
501+
alphabet = ~c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
502502
Enum.at(alphabet, Faker.random_between(0, Enum.count(alphabet) - 1))
503503
end
504504
end

lib/faker/person/pt_br.ex

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ defmodule Faker.Person.PtBr do
1111
## Examples
1212
1313
iex> Faker.Person.PtBr.name()
14-
"Sra. Kaique Mendes Neto"
14+
"Dr. Hélio Mendes Neto"
1515
iex> Faker.Person.PtBr.name()
16-
"Roberta Garcês"
16+
"Bernardo Mangueira"
1717
iex> Faker.Person.PtBr.name()
18-
"Sr. Vitor Albuquerque"
18+
"Sr. Arthur Santana Neto"
1919
iex> Faker.Person.PtBr.name()
20-
"Maria Laura da Penha Jr."
20+
"João Gabriel Resende"
2121
"""
2222
@spec name() :: String.t()
2323
def name, do: name(Faker.random_between(0, 9))
@@ -38,13 +38,13 @@ defmodule Faker.Person.PtBr do
3838
## Examples
3939
4040
iex> Faker.Person.PtBr.first_name()
41-
"Augusto"
41+
"Luiz Henrique"
4242
iex> Faker.Person.PtBr.first_name()
43-
"Amanda"
43+
"Suélen"
4444
iex> Faker.Person.PtBr.first_name()
45-
"Kaique"
45+
"Arthur Henrique"
4646
iex> Faker.Person.PtBr.first_name()
47-
"Antonia"
47+
"Bernardo"
4848
"""
4949
@spec first_name() :: String.t()
5050
def first_name, do: first_name(Faker.random_between(0, 1))
@@ -57,13 +57,13 @@ defmodule Faker.Person.PtBr do
5757
## Examples
5858
5959
iex> Faker.Person.PtBr.male_first_name()
60-
"Augusto"
60+
"Bruno"
6161
iex> Faker.Person.PtBr.male_first_name()
62-
"Benjamin"
62+
"Luiz Henrique"
6363
iex> Faker.Person.PtBr.male_first_name()
64-
"Kaique"
64+
"Hélio"
6565
iex> Faker.Person.PtBr.male_first_name()
66-
"Frederico"
66+
"Mathias"
6767
"""
6868
@spec male_first_name() :: String.t()
6969
sampler(:male_first_name, [
@@ -215,13 +215,13 @@ defmodule Faker.Person.PtBr do
215215
## Examples
216216
217217
iex> Faker.Person.PtBr.female_first_name()
218-
"Luna"
218+
"Maria Helena"
219219
iex> Faker.Person.PtBr.female_first_name()
220-
"Amanda"
220+
"Alessandra"
221221
iex> Faker.Person.PtBr.female_first_name()
222-
"Maria Isis"
222+
"Ayla"
223223
iex> Faker.Person.PtBr.female_first_name()
224-
"Antonia"
224+
"Suélen"
225225
"""
226226

227227
@spec female_first_name() :: String.t()

lib/faker/util.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defmodule Faker.Util do
5151
iex> Faker.Util.sample_uniq(0, &Faker.Internet.email/0)
5252
** (FunctionClauseError) no function clause matching in Faker.Util.sample_uniq/3
5353
"""
54-
@spec sample_uniq(pos_integer, (() -> any), MapSet.t()) :: [any]
54+
@spec sample_uniq(pos_integer, (-> any), MapSet.t()) :: [any]
5555
def sample_uniq(count, sampler, acc \\ MapSet.new())
5656
when is_integer(count) and count > 0 and is_function(sampler, 0) do
5757
case MapSet.size(acc) do
@@ -84,7 +84,7 @@ defmodule Faker.Util do
8484
Enum.map(0..(n - 1), &fun.(&1))
8585
end
8686

87-
@spec list(integer, (() -> any)) :: [any]
87+
@spec list(integer, (-> any)) :: [any]
8888
def list(n, fun) when is_function(fun, 0) do
8989
Enum.map(0..(n - 1), fn _ -> fun.() end)
9090
end
@@ -103,7 +103,7 @@ defmodule Faker.Util do
103103
iex> Faker.Util.join(2, " or ", &Faker.Color.name/0)
104104
"Purple or White"
105105
"""
106-
@spec join(integer, binary, (() -> binary)) :: binary
106+
@spec join(integer, binary, (-> binary)) :: binary
107107
def join(n, joiner \\ "", fun) do
108108
Enum.join(list(n, fun), joiner)
109109
end

0 commit comments

Comments
 (0)