2016-03-28 00:08:52 +03:00
|
|
|
require "./spec_helper"
|
|
|
|
|
|
|
|
describe Faker::Hacker do
|
2017-02-23 19:48:30 +03:00
|
|
|
it { (Faker::Hacker.phrases.size == 8).should be_true }
|
2016-03-28 00:08:52 +03:00
|
|
|
|
|
|
|
it "phrases" do
|
|
|
|
Faker::Hacker.phrases.each do |phrase|
|
|
|
|
phrase.nil?.should be_false
|
|
|
|
(phrase == "").should be_false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
it "noun" do
|
|
|
|
Faker::Hacker.noun.match(/\w+/).should_not eq nil
|
|
|
|
end
|
|
|
|
|
|
|
|
it "abbreviation" do
|
|
|
|
Faker::Hacker.abbreviation.match(/\w+/).should_not eq nil
|
|
|
|
end
|
|
|
|
|
|
|
|
it "adjective" do
|
|
|
|
Faker::Hacker.adjective.match(/\w+/).should_not eq nil
|
|
|
|
end
|
|
|
|
|
|
|
|
it "verb" do
|
|
|
|
Faker::Hacker.verb.match(/\w+/).should_not eq nil
|
|
|
|
end
|
|
|
|
|
|
|
|
it "ingverb" do
|
|
|
|
Faker::Hacker.ingverb.match(/\w+/).should_not eq nil
|
|
|
|
end
|
2017-07-09 14:41:45 +03:00
|
|
|
|
|
|
|
it "should return deterministic results when seeded" do
|
|
|
|
Faker.seed 123456
|
2018-09-21 15:41:48 +03:00
|
|
|
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"
|
2017-07-09 14:41:45 +03:00
|
|
|
Faker::Hacker.verb.should eq "transmit"
|
|
|
|
Faker::Hacker.ingverb.should eq "calculating"
|
|
|
|
end
|
2016-03-28 00:08:52 +03:00
|
|
|
end
|