Hiya,

Very new to Cucumber / Ruby reports, so please excuse the basic question. 
I've an XML file which has 3 tests in it, all with PASSED / FAILED status. 
I'm experimenting in using Cucumber reports to render the XML report in a 
nice format.

All works well until the Then clause, pased below;

Then(/^the test case should have status "(.*?)"$/) do |expected_status|
    actual_status = @current_testcase.at('status').content
expect(actual_status).to eq(expected_status)
# expect{(actual_status).not_to match(expected_status)}.to raise_error
# expect(actual_status).to eq(expected_status), "Expected status: 
#{expected_status}, Actual status: #{actual_status}"
end

the expected _status is either PASSED or FAILED, and in the xml report as 
stated above, it is PASSED / FAILED. The expect clause is correctly working 
this out, and I see errors in the output in the right places, and see 3 
scenarios (2 failed 1 passed) so all looks good. 

When I open the cucumber html report though, all are failed.

No matter what I do, I cannot get any to pass. is there a way to say

if (matched) pass test case, else fail ?

Many thanks,


Trevor.  

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/92158ee8-d3a9-4d24-a10a-24fa98c5ee1cn%40googlegroups.com.

Reply via email to