Sha256: dab138c818dbfcea5210f385726a6badf786582746344948849eeb2477072157
Contents?: true
Size: 703 Bytes
Versions: 2
Compression:
Stored size: 703 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 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gendered-0.0.2 | spec/lib/gendered/guesser_spec.rb |
gendered-0.0.1 | spec/lib/gendered/guesser_spec.rb |