Hi all,
I’m using my own OutputFormatter with /bin/spec to catch rspec results.
I’m experiencing strange behaviour with pending specs and
implementation_backtrace.
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)
end
end
If my code contains a pending example in test_spec.rb like this:
it ‘should be pending’ do
pending
end
‘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?
bye
–
Andreas W.
DynamicDudes
Lightweight Ruby on Rails application development
http://dynamicdudes.com
hire: +49 151 58 54 78 50
home: http://rubyphunk.com