Sha256: 6c6ee309fb56352a5fa30aba83ba51a2a42dfc6af3a6f89b795aeaa1c9b8d4be
Contents?: true
Size: 884 Bytes
Versions: 1
Compression:
Stored size: 884 Bytes
Contents
module Gendered describe Guesser do let :names do ["Sean","Theresa"] end subject do described_class.new names end it "is initialized with names" do expect(subject.names).to eq names end it "creates the correct url" do expect(subject.url).to eq "http://api.genderize.io/?name[0]=Sean&name[1]=Theresa" end it "cannot be initialized with an empty array" do expect{described_class.new([])}.to raise_error ArgumentError end describe "#guess!" do it "returns a valid guesses hash" do names = subject.guess! names.each do |name| expect(name).to be_a Name end end end context "with the name Evat" do let :names do ["Evat"] end it "does not error" do expect{subject.guess!}.to_not raise_error end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gendered-0.0.3 | spec/lib/gendered/guesser_spec.rb |