Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

testcase elements don't have 'name' attribute for dynamically generated rspec examples #6

Closed
justfalter opened this Issue Jun 11, 2010 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

justfalter commented Jun 11, 2010

When handling dynamically generated rspec examples, ci_reporter generates elements without the 'name' attribute. This screws up Hudson's JUnit parsing.

When handling an rspec like this:

describe 12345 do
subject {12345}
it {should eql(12345)}
its(:to_i) {should eql(12345)}
it "should bla"
end

I the testcase elements don't reliably have names:

I dug into it, and it's because of how ci/reporter/rspec.rb gets the example name. In cases where the example name is dynamically generated, the Spec::Example::ExampleProxy#description is nil in example_started, and doesn't get it's description set until example_failed, example_passed, example_pending.
As a result, the XML that's output is missing the name attribute, since it is nil.

Owner

nicksieger commented Oct 11, 2010

Should be fixed in f0f0966.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment