The call to warn in parse_gender_io_result (line 132) writes to $stderr.

I still wanted to record names that were not found but thought it would cause problems throwing an error here as many of the other names in a multiple request may be good. I thought the best thing to was just write a warning to $stderr. Using warn the user can set their error level in the code so if they don't want to get these warnings they can turn them off without modifying the genderize_io_rb.

Kenton White

On Nov 29, 2013, at 3:33 AM, Kasper Johansen <notifications@github.com> wrote:

> In spec/genderize_io_rb_spec.rb:
> 
> > @@ -53,4 +58,17 @@
> >        gir.info_for_name("ksldfjslkjfweuir")
> >      }.to raise_error(GenderizeIoRb::Errors::NameNotFound)
> >    end
> > +  
> > +  it "can make multiple requests" do
> > +    gir = GenderizeIoRb.new
> > +    res = gir.info_for_name(["kasper", "christina", "ksldfjslkjfweuir"])
> > +    res.result[0].name.should eql("kasper")
> > +    res.result[1].name.should eql("christina")
> > +    $stderr.rewind
> > +    $stderr.string.chomp.should eq("Name was not found on Genderize.io: 'ksldfjslkjfweuir'.")
> Dunno if I have missed it, but I cannot figure out where you write to $stderr at?
> 
> —
> Reply to this email directly or view it on GitHub.
>