[Rspec-devel] warnings when running rake test

David Chelimsky dchelimsky at gmail.com
Sat Aug 26 20:54:40 EDT 2006


On 8/26/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> On 8/27/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> > The test task is currently set to show all the warnings. I'd like to
> > either turn them off or modify code to get rid of them.
> >
>
> I thought I had got rid of all the warnings now.
>
> > Preferences?
> >
>
> Keep the warning flag on and keep our code clean.

I agree in spirit, but what "clean" means is subjective. For example,
one warning we get is in reporter.rb:

        return @end_time - @start_time unless (@end_time.nil? or
@start_time.nil?)

This line of code seems perfectly clean, but a warning is generated
stating that @end_time is not initialized. Cleaning this up would
require the following in the initialize method:

  @start_time = nil
  @end_time = nil

Perhaps that is more clear, but it is also more verbose.

Another weird one is in /test/spec/test_to_spec/testfiles/test_unit_api_test.rb:

warning: method redefined; discarding old setup

Wassup w/ that?



>
> Aslak
>
> > David
> > _______________________________________________
> > Rspec-devel mailing list
> > Rspec-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-devel
> >
> _______________________________________________
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the Rspec-devel mailing list