[rspec-users] Weird progress bar failure on unrelated spec

Ashley Moran ashley.moran at patchspace.co.uk
Fri Jan 16 15:39:58 EST 2009


Just as an addendum to that, it also exhibits freezing behaviour on  
one of the specs (presumably the same) with just the one line in  
place.  (It just hangs indefinitely during the progress output.)

Don't expect anyone will be able to figure this out without seeing all  
the code, so I'm hoping someone can tell me where to look...

On 16 Jan 2009, at 20:20, Ashley Moran wrote:

> Hi
>
> Before I try to recreate this, does anyone know what generally  
> causes this in a progress spec run?
>
> ............................/opt/local/lib/ruby/gems/1.8/gems/ 
> rspec-1.1.12/lib/spec/runner/formatter/progress_bar_formatter.rb: 
> 25:in `flush': Bad file descriptor (Errno::EBADF)
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> formatter/progress_bar_formatter.rb:25:in `start_dump'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> reporter.rb:57:in `dump'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> reporter.rb:57:in `each'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> reporter.rb:57:in `dump'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> example_group_runner.rb:38:in `finish'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> example_group_runner.rb:27:in `run'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/ 
> options.rb:111:in `run_examples'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/ 
> runner.rb:78:in `run'
> 	from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/ 
> runner.rb:48:in `register_at_exit_hook'
> 	from spec/followme/content/bbc_page_spec.rb:106
>
> (Line 106 reads 'describe LowGraphicsBBCPage do')
>
> The problem is that the file spec/followme/content/bbc_page_spec.rb  
> is NOT the source of the error, it's actually caused by this in  
> another file:
>
>    class RssReader
>      class RssReaderError < StandardError; end
>
>      def initialize(uri)
>        @uri = uri
>      end
>
>      def rss
>        rss =
>          begin
>            ::RSS::Parser.parse(@uri.read, false)
>          rescue OpenURI::HTTPError, Errno::ECONNREFUSED => error
>            # For some bizarre reason this next line breaks breaks  
> the specs
>            # FollowMe.logger.warn("Error reading RSS")
>            FollowMe.logger.warn(error)
>            raise RssReaderError.new(error.message)
>          end
>        raise RssReaderError.new("No RSS in feed") unless rss
>        rss
>      end
>    end
>
> FollowMe.logger is a mock during the specs of RssReader, but  
> RssReader is not referenced in spec/followme/content/ 
> bbc_page_spec.rb at all.  Stranger, the second of the two log calls  
> does not cause an error.
>
> Anyone got any pointers that could help me figure this one out?
>
> Cheers
> Ashley
>
> -- 
> http://www.patchspace.co.uk/
> http://aviewfromafar.net/
> http://twitter.com/ashleymoran
>
>
>

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/
http://twitter.com/ashleymoran





More information about the rspec-users mailing list