[rspec-users] How to test the code inside the block of the to_xml function?

Alex afolgueras at gmail.com
Fri Feb 6 16:12:01 EST 2009


Hi all, when I spec the to_xml function like this:
@some_model.should_receive(:to_xml), it dskips the code located in the
block, here is the controller code:

...
output = @detenteur.to_xml( :skip_types => false, :skip_instruct =>
true, :dasherize => false, :only => [:inte_no] ) do |xml_detenteur|
lots of code...
end

How can I test the code inside?

Thanks!


More information about the rspec-users mailing list