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

David Chelimsky dchelimsky at gmail.com
Wed Mar 18 12:25:53 EDT 2009


On Wed, Mar 18, 2009 at 11:08 AM, Roman.Chernyatchik
<roman.chernyatchik at jetbrains.com> wrote:
> 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?

You can always create an issue in the bug tracker :)

http://rspec.lighthouseapp.com

I have some thoughts about this but I'd like to capture the
conversation in the tracker.

Thanks,
David

>
> ----
> Best regards,
>
> Roman Chernyatchik,
> RubyMine Developer,
> JetBrains, Inc.
> http://www.jetbrains.com/
> "Develop with Pleasure!"
>
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list