[rspec-devel] Changed Spec::Example::ExampleMethods.execute() behavior in rspec 1.2.0

Roman.Chernyatchik roman.chernyatchik at jetbrains.com
Wed Mar 18 12:08:23 EDT 2009


Hi rspec guys,

I've just noticed that in rspec 1.2.0  
Spec::Example::ExampleMethods.execute() method sends formatter empty  
string instead of example object (as it was in RSpec 1.1.12)
Just compare old and new behaviors:

---- rspec-1.2.0/lib/spec/example/example_methods.rb, lines 28-32 ----
------------------------------------------------------------------------------------------
def execute(run_options, instance_variables) # :nodoc:
   #FIIXME - there is no reason to have example_started pass a name
   # - in fact, it would introduce bugs in cases where no docstring
   # is passed to it()
   run_options.reporter.example_started("")
------------------------------------------------------------------------------------------

with

---- rspec-1.1.12/lib/spec/example/example_methods.rb, lines 44-45  ----
------------------------------------------------------------------------------------------
def execute(options, instance_variables)
   options.reporter.example_started(self)
------------------------------------------------------------------------------------------

Unfortunately this change affects our custom formatter (for RubyMine  
IDE) because in our test runner GUI we use "example_started" event to  
show that corresponding example starts.
It is possible to restore old behavior? May I create issue in bug  
tracker?

----
Best regards,

Roman Chernyatchik,
RubyMine Developer,
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"



More information about the rspec-devel mailing list