My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
DifferencesBetweenRcorAndConcordion  
Known differences between rcor and Concordion
Updated Feb 4, 2010 by b.goodsp...@gmail.com

Lookahead (no longer different)

Concordion will lookahead for variable bindings:

nested.html

<p concordion:execute="#greeting = greetingFor(#firstName)">
    The greeting "<span concordion:assertEquals="#greeting">Hello Bob!</span>"
    should be given to user <span concordion:set="#firstName">Bob</span>
    when he logs in.
</p>

As of 0.7.0 rcor will perform a similar lookahead. See LookaheadExample for more information.

verifyRows

rcor implements verifyRows slightly differently than Concordion. The same tests are expressible in both, the difference is just in the instrumentation style:

Concordion:

 concordion:verifyRows="#single_thing : getThings()"
 ...
 concordion:assertEquals="#single_thing.getWhatever"

repeatedly binds the variable #single_thing as it iterates over the collection yielded by invoking getThings()

rcor:

 concordion:verifyRows="#things = getThings()"
 ...
 concordion:assertEquals="#thing.getWhatever"

does the same thing, but leaves the collection variable available as #things and infers the name by singularizing the collection variable name, in this case #thing.

execute on a table

Concordion expects the instrumentation for a table to exist on the table tag itself. Ruby Concordion expects the same instrumentation to be on the header.

Concordion:

 <table concordion:execute="#result = split(#fullName)">
   <tr>
     <th concordion:set="#fullName">Full Name</th>
     <th concordion:assertEquals="#result.firstName">First Name</th>
     <th concordion:assertEquals="#result.lastName">Last Name</th>
  </tr>
 ...
 </table>

Ruby Concordion:

  <table>
      <tr>
	<th concordion:execute="#row_result = split_by_colons(#TEXT)">Given Text To Split By Colons and Uppercase:</th>
	<th concordion:assertEquals="#row_result.alpha">The First Field is:</th>
	<th concordion:assertEquals="#row_result.beta">The Second Field is:</th>
	<th concordion:assertEquals="#row_result.gamma">The Third Field is:</th>
      </tr>
   ...
   </table>
Comment by bobcorr...@hotmail.com, May 12, 2008

"repeatedly binds the variable #thing" I guess. Thanks for really clear packaging.

Comment by project member b.goodsp...@gmail.com, Dec 1, 2008

Oops, fixed the confusing exposition in verifyRows -- thanks Bob.


Sign in to add a comment
Powered by Google Project Hosting