Nested ExampleGroups not properly recognized in BaseFormatter
Reported by Brian Takita | April 2nd, 2008 @ 06:03 AM | in No-Milestone-Assigned
From Roman Chernyatchik:
E.g. in rspec/spec/spec/example/configuration_spec.rb example group
###########################
describe "#prepend_before" do
it "prepends the before block on all instances of the passed in
type" do
order = []
...
@example_group.it "calls prepend_before" do
end
@example_group.run
order.should == [
...
]
end
end
###########################
leads to HTML output:
---------------------------
Spec::Example::Configuration#prepend_before
Special Example Group
calls prepend_before
prepends the before block on all instances of the passed in type
---------------------------
In fact the order of events is:
1. BaseFormatter.add_example_group : example group description =
"Spec::Example::Configuration#prepend_before"
2. BaseFormatter.example_started : example description = "prepends the
before block on all instances of the passed in type"
3. BaseFormatter.add_example_group : example group description = "Special
Example Group"
4. BaseFormatter.example_started : example description = "prepend_before"
5. BaseFormatter.example_passed : example description = "calls
prepend_before"
6. BaseFormatter.example_passed : example description = "prepends the
before block on all instances of the passed in type"
7. BaseFormatter.add_example_group : example group description =
"Spec::Example::Configuration#append_before"
Comments and changes to this ticket
-

Brian Takita April 2nd, 2008 @ 06:03 AM
- → State changed from new to open
E.g. let's analyze HTML rspec report for this case:
I suppose that instead of
>>>>>>>>>
Spec::Example::Configuration#prepend_before
Special Example Group
calls prepend_before
prepends the before block on all instances of the passed in type
<<<<<<<<<
RSpec should show:
>>>>>>>>>
Spec::Example::Configuration#prepend_before
prepends the before block on all instances of the passed in type
Special Example Group
calls prepend_before
<<<<<<<<<
Or something like this
>>>>>>>>>
Spec::Example::Configuration#prepend_before
prepends the before block on all instances of the passed in type
Spec::Example::Configuration#prepend_before Special Example Group
calls prepend_before
<<<<<<<<<
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.
