From 2d42bb2492d22f97acd57759841b30b8fa21e0df Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Tue, 25 Oct 2016 14:31:54 +0300 Subject: [PATCH] Remove faker gem #206 --- Gemfile | 1 - Gemfile.lock | 3 --- spec/fabricators/address_fabricator.rb | 8 ++++---- spec/fabricators/contact_fabricator.rb | 6 +++--- spec/fabricators/nameserver_fabricator.rb | 2 +- spec/fabricators/registrant_fabricator.rb | 6 +++--- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index dca8f6382..51233b88b 100644 --- a/Gemfile +++ b/Gemfile @@ -166,6 +166,5 @@ end group :test do gem 'database_cleaner' - gem 'faker' gem 'factory_girl_rails' end diff --git a/Gemfile.lock b/Gemfile.lock index 3497dc08f..4cdce9047 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -211,8 +211,6 @@ GEM factory_girl_rails (4.7.0) factory_girl (~> 4.7.0) railties (>= 3.0.0) - faker (1.4.3) - i18n (~> 0.5) fastercsv (1.5.5) ffi (1.9.10) figaro (1.1.1) @@ -605,7 +603,6 @@ DEPENDENCIES epp-xml (= 1.0.5)! fabrication (= 2.13.2) factory_girl_rails - faker figaro (= 1.1.1) grape (= 0.12.0) guard (= 2.12.9) diff --git a/spec/fabricators/address_fabricator.rb b/spec/fabricators/address_fabricator.rb index 70aa7f867..ecdb50f58 100644 --- a/spec/fabricators/address_fabricator.rb +++ b/spec/fabricators/address_fabricator.rb @@ -1,6 +1,6 @@ Fabricator(:address) do - city Faker::Address.city - street Faker::Address.street_name - street2 Faker::Address.street_name - zip Faker::Address.zip + city 'test city' + street 'test street' + street2 'test street' + zip 12345 end diff --git a/spec/fabricators/contact_fabricator.rb b/spec/fabricators/contact_fabricator.rb index 68289d77c..8f68c518d 100644 --- a/spec/fabricators/contact_fabricator.rb +++ b/spec/fabricators/contact_fabricator.rb @@ -1,10 +1,10 @@ Fabricator(:contact) do registrar { Fabricate(:registrar) } - code { sequence(:code) { |i| "SH#{Faker::Number.number(8)}#{i}" } } + code { sequence(:code) { |i| "1234#{i}#{rand(1000)}" } } auth_info 'password' - name { sequence(:name) { |i| "#{Faker::Name.name}#{i}" } } + name 'test name' phone '+372.12345678' - email Faker::Internet.email + email { sequence(:email) { |i| "test#{i}@test.com" } } street 'Short street 11' city 'Tallinn' zip '11111' diff --git a/spec/fabricators/nameserver_fabricator.rb b/spec/fabricators/nameserver_fabricator.rb index 87d0d76d3..f73668b25 100644 --- a/spec/fabricators/nameserver_fabricator.rb +++ b/spec/fabricators/nameserver_fabricator.rb @@ -1,4 +1,4 @@ Fabricator(:nameserver) do - hostname { sequence(:hostname) { |i| "ns.#{Faker::Internet.domain_word}#{i}.ee" } } + hostname { sequence(:hostname) { |i| "ns.test#{i}.ee" } } ipv4 '192.168.1.1' end diff --git a/spec/fabricators/registrant_fabricator.rb b/spec/fabricators/registrant_fabricator.rb index 445134fb9..42cff7cdf 100644 --- a/spec/fabricators/registrant_fabricator.rb +++ b/spec/fabricators/registrant_fabricator.rb @@ -1,10 +1,10 @@ Fabricator(:registrant) do registrar { Fabricate(:registrar) } - code { sequence(:code) { |i| "REGISTRANT#{Faker::Number.number(8)}#{i}" } } + code { sequence(:code) { |i| "REGISTRANT#{i}#{rand(1000)}" } } auth_info 'password' - name { sequence(:name) { |i| "REGISTRANT #{Faker::Name.name}#{i}" } } + name 'test name' phone '+372.12345678' - email Faker::Internet.email + email { sequence(:email) { |i| "test#{i}@test.com" } } street 'Short street 11' city 'Tallinn' zip '11111'