I encountered a bug in RSpec 1.x where stubbed class methods ("static methods") would not be unstubbed before the next example, causing it to fail. This behavior can come and go as you edit your specs, since this can change the order in which RSpec evaluates your .rb
files.
I was not able to find a fix for this behavior. Calling #rspec_reset
und #unstub!(:method)
on the class after the example did not help. I know for sure that stubbing static methods has not been a problem in many other projects. I encountered the bug while working on
Cucumber Factory
Show archive.org snapshot
.
This might be fixed Show archive.org snapshot in RSpec 2.
Posted by Henning Koch to makandra dev (2011-06-12 12:17)