[rspec-users] Strange behaviour with pending specs and implementation_backtrace
dchelimsky at gmail.com
Tue Jul 8 08:29:31 EDT 2008
On Jul 8, 2008, at 3:59 AM, Andreas Wolff wrote:
> Hi all,
> I'm using my own OutputFormatter with /bin/spec to catch rspec
> results. I'm experiencing strange behaviour with pending specs and
> This is my example_pending implementation in rspactor_formatter.rb:
> class RSpactorFormatter
> def example_pending(example, message)
> spec = SpecObject.new(
> :name => example.description,
> :example_group_name => @example_group.description,
> :state => :pending,
> :message => message,
> :backtrace => example.implementation_backtrace
> @remote_service.incoming(:spec_run_example_pending, spec)
> If my code contains a pending example in test_spec.rb like this:
> it 'should be pending' do
> 'example.implementation_backtrace' contains the correct file path.
> If I change the implementation to:
> it 'should be pending'
> 'example.implementation_backtrace' doesn't contain the correct file
> path anymore. Instead the backtrace ends with my custom formatter
> file 'rspactor_formatter.rb'.
> Is this behaviour correct? Am I something missing?
It's a bug. RSpec doesn't report backtraces of pending examples so
this never came up.
Please report this to http://rspec.lighthouseapp.com
> Andreas Wolff
> Lightweight Ruby on Rails application development
> hire: +49 151 58 54 78 50
> home: http://rubyphunk.com
More information about the rspec-users