Strange behaviour with pending specs and implementation_backtrace
Reported by rubyphunk | July 8th, 2008 @ 02:55 PM | in No-Milestone-Assigned
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'.
Comments and changes to this ticket
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Behaviour Driven Development for Ruby.
