From ed11040aa52269d2e436c16dc376473f902fab0b Mon Sep 17 00:00:00 2001 From: Ricky Chilcott Date: Fri, 21 Sep 2018 08:13:42 -0400 Subject: [PATCH 1/4] Run crystal tool format --- src/faker.cr | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/faker.cr b/src/faker.cr index de1ab86..8fb0d16 100644 --- a/src/faker.cr +++ b/src/faker.cr @@ -23,16 +23,16 @@ module Faker def self.regexify(re) re = re.source if re.is_a?(Regex) - re.gsub(/^\/?\^?/, "").gsub(/\$?\/?$/, "") # Ditch the anchors - .gsub(/\{(\d+)\}/) { "{#{$1},#{$1}}" }.gsub(/\?/, "{0,1}") # All {2} become {2,2} and ? become {0,1} - .gsub(/(\[[^\]]+\])\{(\d+),(\d+)\}/) { |match| $1 * (Range.new($2.to_i, $3.to_i)).to_a.sample(@@rng) } # [12]{1,2} becomes [12] or [12][12] - .gsub(/(\([^\)]+\))\{(\d+),(\d+)\}/) { |match| $1 * ($2.to_i..$3.to_i).to_a.sample(@@rng) } # (12|34){1,2} becomes (12|34) or (12|34)(12|34) - .gsub(/(\\?.)\{(\d+),(\d+)\}/) { |match| $1 * ($2.to_i..$3.to_i).to_a.sample(@@rng) } # A{1,2} becomes A or AA or \d{3} becomes \d\d\d - .gsub(/\((.*?)\)/) { |match| match.gsub(/[\(\)]/, "").split("|").sample(@@rng) } # (this|that) becomes "this" or "that" - .gsub(/\[([^\]]+)\]/) { |match| match.gsub(/(\w\-\w)/) { |range| ((0...range.size).map { |i| range[i].to_s }).join("").split("-").to_a.sample(@@rng) } } # All A-Z inside of [] become C (or X, or whatever) - .gsub(/\[([^\]]+)\]/) { |match| $1.split("").sample(@@rng) } # All [ABC] become B (or A or C) - .gsub("\\d") { |match| (0..9).to_a.sample(@@rng) } - .gsub("\\w") { |match| (("A".."Z").to_a + (0..9).to_a).sample(@@rng) } + re.gsub(/^\/?\^?/, "").gsub(/\$?\/?$/, "") # Ditch the anchors + .gsub(/\{(\d+)\}/) { "{#{$1},#{$1}}" }.gsub(/\?/, "{0,1}") # All {2} become {2,2} and ? become {0,1} + .gsub(/(\[[^\]]+\])\{(\d+),(\d+)\}/) { |match| $1 * (Range.new($2.to_i, $3.to_i)).to_a.sample(@@rng) } # [12]{1,2} becomes [12] or [12][12] + .gsub(/(\([^\)]+\))\{(\d+),(\d+)\}/) { |match| $1 * ($2.to_i..$3.to_i).to_a.sample(@@rng) } # (12|34){1,2} becomes (12|34) or (12|34)(12|34) + .gsub(/(\\?.)\{(\d+),(\d+)\}/) { |match| $1 * ($2.to_i..$3.to_i).to_a.sample(@@rng) } # A{1,2} becomes A or AA or \d{3} becomes \d\d\d + .gsub(/\((.*?)\)/) { |match| match.gsub(/[\(\)]/, "").split("|").sample(@@rng) } # (this|that) becomes "this" or "that" + .gsub(/\[([^\]]+)\]/) { |match| match.gsub(/(\w\-\w)/) { |range| ((0...range.size).map { |i| range[i].to_s }).join("").split("-").to_a.sample(@@rng) } } # All A-Z inside of [] become C (or X, or whatever) + .gsub(/\[([^\]]+)\]/) { |match| $1.split("").sample(@@rng) } # All [ABC] become B (or A or C) + .gsub("\\d") { |match| (0..9).to_a.sample(@@rng) } + .gsub("\\w") { |match| (("A".."Z").to_a + (0..9).to_a).sample(@@rng) } end def self.fetch(data) From c25ae912bf6c79ceceb6e1755fedc29f4480b44f Mon Sep 17 00:00:00 2001 From: Ricky Chilcott Date: Fri, 21 Sep 2018 08:14:13 -0400 Subject: [PATCH 2/4] Ignore .DS_Store files --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c8cf75a..65eded6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,8 @@ /libs/ /.crystal/ /.shards/ - +.DS_Store # Libraries don't need dependency lock # Dependencies will be locked in application that uses them /shard.lock - From 76edfcec5dac7ce6025e399f3750afca6e379ba3 Mon Sep 17 00:00:00 2001 From: Ricky Chilcott Date: Fri, 21 Sep 2018 08:31:25 -0400 Subject: [PATCH 3/4] Use parse_local because parse requires location to be provided --- src/faker/business.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/faker/business.cr b/src/faker/business.cr index a0def9b..01179aa 100644 --- a/src/faker/business.cr +++ b/src/faker/business.cr @@ -6,7 +6,7 @@ module Faker def self.credit_card_expiry_date credit_card_expiry_date = Faker.fetch(Data["business"]["credit_card_expiry_dates"]).as String - Time.parse(credit_card_expiry_date, "%Y-%m-%d") + Time.parse_local(credit_card_expiry_date, "%Y-%m-%d") end def self.credit_card_type From 6e5e8fad114ab295e300b41d76cac2feb3df8d43 Mon Sep 17 00:00:00 2001 From: Ricky Chilcott Date: Fri, 21 Sep 2018 08:41:48 -0400 Subject: [PATCH 4/4] Fixing specs --- spec/address_spec.cr | 34 +++++++++++++-------------- spec/business_spec.cr | 4 ++-- spec/commerce_spec.cr | 14 ++++++------ spec/company_spec.cr | 6 ++--- spec/hacker_spec.cr | 8 +++---- spec/internet_spec.cr | 46 ++++++++++++++++++------------------- spec/lorem_spec.cr | 48 ++++++++++++++++++--------------------- spec/name_spec.cr | 12 +++++----- spec/number_spec.cr | 16 ++++++------- spec/phone_number_spec.cr | 2 +- spec/team_spec.cr | 6 ++--- 11 files changed, 96 insertions(+), 100 deletions(-) diff --git a/spec/address_spec.cr b/spec/address_spec.cr index 7db4de6..876f4eb 100644 --- a/spec/address_spec.cr +++ b/spec/address_spec.cr @@ -3,22 +3,22 @@ require "./spec_helper" describe Faker::Address do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Address.city.should eq "North Mercedesmouth" - Faker::Address.street_name.should eq "Thalia Tunnel" - Faker::Address.street_address.should eq "33421 Kunde Mills" - Faker::Address.secondary_address.should eq "Apt. 475" - Faker::Address.building_number.should eq "4103" - Faker::Address.zip_code.should eq "32555" - Faker::Address.postcode.should eq "GX44 3IC" - Faker::Address.time_zone.should eq "Asia/Rangoon" - Faker::Address.street_suffix.should eq "Springs" - Faker::Address.city_suffix.should eq "town" - Faker::Address.city_prefix.should eq "North" - Faker::Address.state.should eq "Missouri" - Faker::Address.state_abbr.should eq "TN" - Faker::Address.country.should eq "Svalbard & Jan Mayen Islands" - Faker::Address.country_code.should eq "IS" - Faker::Address.latitude.should eq "15.393888556377334" - Faker::Address.longitude.should eq "-77.86301819889268" + Faker::Address.city.should eq "Kemmerland" + Faker::Address.street_name.should eq "Boyer Views" + Faker::Address.street_address.should eq "82059 Batz Passage" + Faker::Address.secondary_address.should eq "Apt. 856" + Faker::Address.building_number.should eq "22820" + Faker::Address.zip_code.should eq "89366" + Faker::Address.postcode.should eq "JA95 9QF" + Faker::Address.time_zone.should eq "Pacific/Honolulu" + Faker::Address.street_suffix.should eq "Loop" + Faker::Address.city_suffix.should eq "mouth" + Faker::Address.city_prefix.should eq "Lake" + Faker::Address.state.should eq "Montana" + Faker::Address.state_abbr.should eq "VA" + Faker::Address.country.should eq "Swaziland" + Faker::Address.country_code.should eq "MK" + Faker::Address.latitude.should eq "-23.850993082533705" + Faker::Address.longitude.should eq "-4.488135572134695" end end diff --git a/spec/business_spec.cr b/spec/business_spec.cr index a3954bb..1410fa1 100644 --- a/spec/business_spec.cr +++ b/spec/business_spec.cr @@ -3,8 +3,8 @@ require "./spec_helper" describe Faker::Business do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Business.credit_card_number.should eq "1234-2121-1221-1211" + Faker::Business.credit_card_number.should eq "1228-1221-1221-1431" Faker::Business.credit_card_expiry_date.should eq Time.new(2013, 9, 12) - Faker::Business.credit_card_type.should eq "diners_club" + Faker::Business.credit_card_type.should eq "mastercard" end end diff --git a/spec/commerce_spec.cr b/spec/commerce_spec.cr index c23cac0..4f709d7 100644 --- a/spec/commerce_spec.cr +++ b/spec/commerce_spec.cr @@ -55,12 +55,12 @@ describe Faker::Commerce do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Commerce.color.should eq "salmon" - Faker::Commerce.department.should eq "Home, Movies & Computers" - Faker::Commerce.department(5).should eq "Toys & Home" - Faker::Commerce.department(2, true).should eq "Electronics & Tools" - Faker::Commerce.product_name.should eq "Heavy Duty Copper Lamp" - Faker::Commerce.price.should eq 47.25 - Faker::Commerce.material.should eq "Rubber" + Faker::Commerce.color.should eq "fuchsia" + Faker::Commerce.department.should eq "Garden & Tools" + Faker::Commerce.department(5).should eq "Kids, Health, Tools & Music" + Faker::Commerce.department(2, true).should eq "Garden & Industrial" + Faker::Commerce.product_name.should eq "Durable Aluminum Bag" + Faker::Commerce.price.should eq 62.86 + Faker::Commerce.material.should eq "Leather" end end diff --git a/spec/company_spec.cr b/spec/company_spec.cr index 62ca2f6..cdfa231 100644 --- a/spec/company_spec.cr +++ b/spec/company_spec.cr @@ -8,8 +8,8 @@ describe Faker::Company do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Company.name.should eq "Larson-Altenwerth" - Faker::Company.suffix.should eq "Group" - Faker::Company.logo.should eq "https://pigment.github.io/fake-logos/logos/medium/color/12.png" + Faker::Company.name.should eq "Kemmer-Gleichner" + Faker::Company.suffix.should eq "Inc" + Faker::Company.logo.should eq "https://pigment.github.io/fake-logos/logos/medium/color/10.png" end end diff --git a/spec/hacker_spec.cr b/spec/hacker_spec.cr index 0c4d776..aff09ac 100644 --- a/spec/hacker_spec.cr +++ b/spec/hacker_spec.cr @@ -32,10 +32,10 @@ describe Faker::Hacker do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Hacker.say_something_smart.should eq "You can't override the sensor without overriding the primary JBOD transmitter!" - Faker::Hacker.abbreviation.should eq "SCSI" - Faker::Hacker.adjective.should eq "primary" - Faker::Hacker.noun.should eq "pixel" + Faker::Hacker.say_something_smart.should eq "backing up the transmitter won't do anything, we need to bypass the optical RSS firewall!" + Faker::Hacker.abbreviation.should eq "USB" + Faker::Hacker.adjective.should eq "virtual" + Faker::Hacker.noun.should eq "port" Faker::Hacker.verb.should eq "transmit" Faker::Hacker.ingverb.should eq "calculating" end diff --git a/spec/internet_spec.cr b/spec/internet_spec.cr index 0f9c65c..f56f2bb 100644 --- a/spec/internet_spec.cr +++ b/spec/internet_spec.cr @@ -169,31 +169,31 @@ describe Faker::Internet do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Internet.email.should eq "internet_faker@kirlinblock.biz" - Faker::Internet.email("Nancy").should eq "nancy@cremin.io" - Faker::Internet.free_email.should eq "faker.internet@gmail.com" - Faker::Internet.free_email("Nancy").should eq "nancy@hotmail.com" - Faker::Internet.safe_email.should eq "faker_internet@example.net" - Faker::Internet.safe_email("Nancy").should eq "nancy@example.net" - Faker::Internet.user_name.should eq "faker.internet" + Faker::Internet.email.should eq "faker_internet@deckowboyer.biz" + Faker::Internet.email("Nancy").should eq "nancy@batz.org" + Faker::Internet.free_email.should eq "internet.faker@hotmail.com" + Faker::Internet.free_email("Nancy").should eq "nancy@yahoo.com" + Faker::Internet.safe_email.should eq "internet_faker@example.org" + Faker::Internet.safe_email("Nancy").should eq "nancy@example.com" + Faker::Internet.user_name.should eq "internet.faker" Faker::Internet.user_name("Nancy").should eq "nancy" - Faker::Internet.user_name("Nancy Johnson", [".", "_", "-"] of ::String).should eq "johnson.nancy" - Faker::Internet.password.should eq "Tb34Ap05U" - Faker::Internet.password(8).should eq "BhI59sBo9" - Faker::Internet.password(10, 20).should eq "9r3b4iL8HeY" - Faker::Internet.password(10, 20, true).should eq "91JpPrF867Z" - Faker::Internet.password(10, 20, true, true).should eq "Pl5q3eOqZsK" - Faker::Internet.domain_name.should eq "ullrichklocko.biz" - Faker::Internet.domain_word.should eq "lockman" - Faker::Internet.domain_suffix.should eq "net" - Faker::Internet.ip_v4_address.should eq "6.70.63.244" - Faker::Internet.ip_v6_address.should eq "8a31:c21c:fb41:eea8:9df:aeab:9f78:5a49" - Faker::Internet.mac_address.should eq "00:4b:14:3d:24:55" - Faker::Internet.mac_address("55:44:33").should eq "55:44:33:36:0e:5d" - Faker::Internet.url.should eq "http://koelpin.biz/internet_faker" - Faker::Internet.url("example.com").should eq "http://example.com/faker_internet" + Faker::Internet.user_name("Nancy Johnson", [".", "_", "-"] of ::String).should eq "nancy-johnson" + Faker::Internet.password.should eq "NuSjR9XpA" + Faker::Internet.password(8).should eq "Tb7vMjXzD" + Faker::Internet.password(10, 20).should eq "Xc0qFgOxMo" + Faker::Internet.password(10, 20, true).should eq "J9GvT6LdLd7" + Faker::Internet.password(10, 20, true, true).should eq "#*^!#&@%^iG" + Faker::Internet.domain_name.should eq "hackett.net" + Faker::Internet.domain_word.should eq "murphy" + Faker::Internet.domain_suffix.should eq "co" + Faker::Internet.ip_v4_address.should eq "38.54.91.207" + Faker::Internet.ip_v6_address.should eq "f682:cc5a:cb38:94d3:7911:ff68:94df:f377" + Faker::Internet.mac_address.should eq "00:d0:57:d9:d8:d5" + Faker::Internet.mac_address("55:44:33").should eq "55:44:33:bc:fd:c8" + Faker::Internet.url.should eq "http://vonruedenlind.name/faker_internet" + Faker::Internet.url("example.com").should eq "http://example.com/internet_faker" Faker::Internet.url("example.com", "/foobar.html").should eq "http://example.com/foobar.html" - Faker::Internet.slug.should eq "voluptatem.dicta" + Faker::Internet.slug.should eq "mollitia.nostrum" Faker::Internet.slug("foo bar").should eq "foo.bar" Faker::Internet.slug("foo bar", "-").should eq "foo-bar" end diff --git a/spec/lorem_spec.cr b/spec/lorem_spec.cr index ad3fe58..9820576 100644 --- a/spec/lorem_spec.cr +++ b/spec/lorem_spec.cr @@ -3,31 +3,27 @@ require "./spec_helper" describe Faker::Lorem do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Lorem.word.should eq "voluptatem" - Faker::Lorem.words.should eq ["quos", "recusandae", "sed"] - Faker::Lorem.words(4).should eq ["iusto", "quia", "placeat", "quia"] - Faker::Lorem.words(4, true).should eq ["vis", "ambulo", "vesica", "vivo"] - Faker::Lorem.characters.should eq "xk7jz4c7a0w5ceh9opz68kq3xzdt5d2rtu29ky6jlb1ltxk3xvqkp87o2c7bs070wggzuz78an6t4cg8fejvhskgfe6ry104yc7kam8p91oaf6bqb61tp84q4958om8glep3wjrl9no32fj1eoklww8bzhvzmdkyp1tn51zxpzm8eynd7mbix1rimwrpufnut2a58d76mwrn4epjao7pedef2roosl2simxsvi4lejwzrdojegew2csobpw2lym" - Faker::Lorem.characters(10).should eq "vp5j8u3r1l" - Faker::Lorem.sentence.should eq "Itaque quod aliquam veritatis nemo dolorum sequi." - Faker::Lorem.sentence(3).should eq "Accusantium dolores suscipit praesentium." - Faker::Lorem.sentence(3, true).should eq "Spiculum triumphus necessitatibus appono angulus aut cariosus." - Faker::Lorem.sentence(3, false, 4).should eq "Atque sed perferendis minus." - Faker::Lorem.sentence(3, true, 4).should eq "Cohors traho tamdiu alveus itaque." - Faker::Lorem.sentences.should eq ["Sed ab quia.", - "Consequatur doloremque dolores ratione voluptas esse aut vero.", - "Qui dicta est odit nihil exercitationem nesciunt."] - Faker::Lorem.sentences(1).should eq ["Reiciendis doloremque vero sequi et quia."] - Faker::Lorem.sentences(1, true).should eq ["Concido quisquam cerno vulpes maxime mollitia."] - Faker::Lorem.paragraph.should eq "Maxime magnam vel velit id. Sed cupiditate blanditiis. Cupiditate sit aliquam vero." - Faker::Lorem.paragraph(2).should eq "Nemo laboriosam quod accusamus ab modi excepturi. Eveniet rerum quasi quia culpa. Vero quis aut. A assumenda tenetur." - Faker::Lorem.paragraph(2, true).should eq "Pecunia sopor ars vero subiungo quis urbanus. Demens minus delinquo." - Faker::Lorem.paragraph(2, false, 4).should eq "Mollitia delectus qui et ut quasi. Eligendi aut facilis praesentium ducimus qui. Itaque molestiae laudantium qui omnis veritatis soluta. Quia reiciendis dignissimos saepe architecto. Eum excepturi dolores iusto quisquam." - Faker::Lorem.paragraph(2, true, 4).should eq "Depraedor vitae spectaculum cupio acervus conatus adipisci. Pecus vulgivagus terra aliqua arbitro. Suscipio socius cupiditas arguo cetera colloco trans solitudo. Adimpleo stillicidium eaque ocer placeat adstringo ustulo balbus. Versus viduo videlicet tenus absconditus." - Faker::Lorem.paragraphs.should eq ["Rerum odit ducimus ipsum at sint. Consequatur sed non dolorem. Incidunt quae libero. Enim quam molestiae necessitatibus.", - "Inventore eos dolores asperiores corrupti cupiditate. Illum at molestiae cumque eaque aut. Blanditiis et laudantium neque. Consequatur labore officiis pariatur possimus facilis.", - "Esse fuga cum quisquam tenetur impedit rem repellat. Quia deleniti nulla. Excepturi perferendis dolor accusamus."] - Faker::Lorem.paragraphs(1).should eq ["Rerum unde voluptas sint autem. Fugit tenetur sequi totam esse. Explicabo omnis consequatur inventore autem. Et et praesentium neque quo natus."] - Faker::Lorem.paragraphs(1, true).should eq ["Conitor reiciendis minima viridis temporibus spiritus. Tabula crustulum error titulus et comptus. Coruscus turpis amplitudo combibo alias deludo triginta."] + Faker::Lorem.word.should eq "consequatur" + Faker::Lorem.words.should eq ["porro", "eos", "velit"] + Faker::Lorem.words(4).should eq ["illo", "omnis", "quam", "quia"] + Faker::Lorem.words(4, true).should eq ["abstergo", "volo", "congregatio", "cenaculum"] + Faker::Lorem.characters.should eq "rtu4oasce8rh8v9boy4o7dvw9da4ehtukyicl07az92gxkatlehuga41fqg8v06po1txnjcylbivmv5z9rcgg0hizegu4lck3rnja8kvpwiwp4lds3au07h9lk3k3y7a1c5ec2jtlo5zjtcm3blh6zgtk9rq8wpkqszhv0tstyydx8974aik0j2nkck9ve4kjmh0gn9als5wwxjwtot2yegk8jwe8plvbffu86w38abdq4cupnu4tig75lmu82g" + Faker::Lorem.characters(10).should eq "qunro8qzs5" + Faker::Lorem.sentence.should eq "Dicta laudantium aut aut et asperiores quidem accusamus impedit." + Faker::Lorem.sentence(3).should eq "Quam eum fugit." + Faker::Lorem.sentence(3, true).should eq "Caelum arma illum depopulo cupressus quaerat suus." + Faker::Lorem.sentence(3, false, 4).should eq "Est non necessitatibus." + Faker::Lorem.sentence(3, true, 4).should eq "Accedo venustas summisse cito sperno." + Faker::Lorem.sentences.should eq ["Voluptatem similique quia architecto quo.", "Culpa fugiat pariatur facilis ea accusantium voluptatem consequatur.", "Similique quis velit excepturi quia."] + Faker::Lorem.sentences(1).should eq ["Tempore repellat omnis."] + Faker::Lorem.sentences(1, true).should eq ["Aedificium adhuc patruus capio valens molestiae sit."] + Faker::Lorem.paragraph.should eq "Fugit repellendus suscipit dolores. Voluptatem adipisci nihil cupiditate quisquam ad. Est repellat consequuntur laboriosam reiciendis est sit. Vel molestiae ipsam." + Faker::Lorem.paragraph(2).should eq "Non consectetur itaque aut voluptas cumque est numquam. Non impedit quaerat iusto consequatur tempora nemo amet." + Faker::Lorem.paragraph(2, true).should eq "Pecus urbs curo vinitor volubilis. Coadunatio tunc quas compono. Vetus ascit adfectus civis minus tristis adulatio solio." + Faker::Lorem.paragraph(2, false, 4).should eq "Minima ducimus officia reprehenderit dolorem. Labore quia ut asperiores eos excepturi. Quibusdam tempore incidunt sunt quaerat provident." + Faker::Lorem.paragraph(2, true, 4).should eq "Tego vinco ultio celebrer eveniet cupio argentum speculum. Candidus arbor quibusdam angulus termes. Strenuus concido vulnero. Desino assentator deludo stabilis vallum autem demergo. Temeritas tristis nihil aperio acerbitas." + Faker::Lorem.paragraphs.should eq ["Voluptatem id dolor tempora. Praesentium harum dolores et explicabo unde ut. Sit deleniti vel ullam enim neque non itaque. Rerum qui quam quis et voluptate. Modi tenetur eius molestiae.", "Eaque pariatur quasi optio aliquam nihil quibusdam inventore. Voluptas eaque est nesciunt tenetur vel. Accusamus et et.", "Distinctio cum deserunt quia natus eos debitis neque. Qui voluptates quisquam. Facilis voluptatem et. Nihil nostrum occaecati at."] + Faker::Lorem.paragraphs(1).should eq ["Libero voluptatem neque et autem aspernatur earum animi. Ut iure sed quo quasi dolores aut. Voluptas possimus voluptatem nisi."] + Faker::Lorem.paragraphs(1, true).should eq ["Cibo cognatus temporibus demulceo cinis. Voluptatibus vobis ver cursus aperiam sulum apostolus. Id animadverto caste. Summisse derideo vallum. Suspendo et denuo collum accendo tamisium verecundia iste."] end end diff --git a/spec/name_spec.cr b/spec/name_spec.cr index d7198cf..b692ec4 100644 --- a/spec/name_spec.cr +++ b/spec/name_spec.cr @@ -3,11 +3,11 @@ require "./spec_helper" describe Faker::Name do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Name.name.should eq "Bernie Altenwerth" - Faker::Name.first_name.should eq "Ron" - Faker::Name.last_name.should eq "Block" - Faker::Name.prefix.should eq "Mrs." - Faker::Name.suffix.should eq "Sr." - Faker::Name.title.should eq "Product Markets Specialist" + Faker::Name.name.should eq "Danyka Gleichner DDS" + Faker::Name.first_name.should eq "Molly" + Faker::Name.last_name.should eq "Fay" + Faker::Name.prefix.should eq "Dr." + Faker::Name.suffix.should eq "DDS" + Faker::Name.title.should eq "Direct Markets Associate" end end diff --git a/spec/number_spec.cr b/spec/number_spec.cr index 331f641..49e02a0 100644 --- a/spec/number_spec.cr +++ b/spec/number_spec.cr @@ -67,13 +67,13 @@ describe Faker::Number do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Number.number(10).should eq "6961710422" - Faker::Number.decimal(2).should eq "82.34" - Faker::Number.decimal(2, 3).should eq "21.217" - Faker::Number.hexadecimal(3).should eq "046" - Faker::Number.between(1, 10).should eq 2 - Faker::Number.positive.should eq 3995.8054520295627 - Faker::Number.negative.should eq -748.5527873256278 - Faker::Number.digit.should eq "2" + Faker::Number.number(10).should eq "9394314441" + Faker::Number.decimal(2).should eq "12.05" + Faker::Number.decimal(2, 3).should eq "98.256" + Faker::Number.hexadecimal(3).should eq "37c" + Faker::Number.between(1, 10).should eq 9 + Faker::Number.positive.should eq 352.4124353316201 + Faker::Number.negative.should eq -4363.992315679857 + Faker::Number.digit.should eq "9" end end diff --git a/spec/phone_number_spec.cr b/spec/phone_number_spec.cr index d5548ca..4990f48 100644 --- a/spec/phone_number_spec.cr +++ b/spec/phone_number_spec.cr @@ -3,6 +3,6 @@ require "./spec_helper" describe Faker::PhoneNumber do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::PhoneNumber.phone_number.should eq "361-710-4228 x23421" + Faker::PhoneNumber.phone_number.should eq "894.314.4411 x20598" end end diff --git a/spec/team_spec.cr b/spec/team_spec.cr index bdc1aae..72f3a1b 100644 --- a/spec/team_spec.cr +++ b/spec/team_spec.cr @@ -19,8 +19,8 @@ describe Faker::Team do it "should return deterministic results when seeded" do Faker.seed 123456 - Faker::Team.creature.should eq "buffalo" - Faker::Team.name.should eq "Washington sorcerors" - Faker::Team.state.should eq "Delaware" + Faker::Team.creature.should eq "vampires" + Faker::Team.name.should eq "New Jersey griffins" + Faker::Team.state.should eq "Arkansas" end end