fails with rspec 1.2.2
Reported by Steven Soroka | March 26th, 2009 @ 02:29 AM
output:
nvironment loaded with Ruby v1.8.6, Patch level 114. Rails
v2.3.2
loading libs
Loading application controller
Wed Mar 25 19:57:31 -0500 2009 :: DEBUG :: Remote: Initialized
Wed Mar 25 19:57:31 -0500 2009 :: DEBUG :: Remote: Started spec run
for 2659 specs
Wed Mar 25 19:57:32 -0500 2009 :: ERROR :: Error: You have a nil
object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.length
Wed Mar 25 19:57:32 -0500 2009 :: DEBUG :: Remote: Closed
(druby://127.0.0.1:28127)
/Applications/RSpactor.app/Contents/Resources/app_controller.rb:68:in
spec_run_processed': undefined method
empty?' for
true:TrueClass (NoMethodError) from (druby://127.0.0.1:28127)
/Applications/RSpactor.app/Contents/Resources/service.rb:32:in
postNotificationName_object_userInfo' from
(druby://127.0.0.1:28127)
/Applications/RSpactor.app/Contents/Resources/service.rb:32:in
incoming'
from
/Applications/RSpactor.app/Contents/Resources/rspactor_formatter.rb:40:in
example_passed' from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/reporter.rb:103:in
example_passed'
from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/reporter.rb:103:in
each' from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/reporter.rb:103:in
example_passed'
from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/reporter.rb:27:in
example_finished' from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/example/example_methods.rb:48:in
execute'
... 6 levels... from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/example_group_runner.rb:22:in
run' from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/options.rb:117:in
run_examples'
from
/Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/command_line.rb:9:in
`run' from /Users/steven/Projects/project_name/script/spec:10
Comments and changes to this ticket
-
Andreas Wolff March 26th, 2009 @ 12:58 PM
- State changed from new to open
-
Joshua Krall April 25th, 2009 @ 05:30 AM
I fixed this for myself with the following changes to rspactor_formatter.rb...
from line:86
if example.respond_to?(:backtrace) dummy = example.location.split("\n") return dummy
It seems like the @implementation variable no longer exists on the example object. Or rather, example is actually an example_proxy, which doesn't have the @implementation instance variable.
However, if all we're trying to do is get at the backtrace... then the .location method seems to be the right way to go.
-
Joshua Krall April 25th, 2009 @ 05:31 AM
Actually, I guess technically it should be this:
if example.respond_to?(:location) dummy = example.location.split("\n") return dummy
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RSpactor is a Mac OS X application that takes care of your RSpec examples.