Alright.
That leads us to another question I wanted to ask. See, I also want to check for the presence of different types of things:
Then.the(quant).expects_that(the_link("Back to backtests"), is_not_present());
Then.the(quant).expects_that(the_html_table("transactionTable"), is_not_present());
Do you actually have different is_not_present() methods, with different names (maybe "is_not_present_as_a_table()" and "is_not_present_as_a_link()")? That sounds a bit cumbersome.
On the other hand, I do have separate methods when the implementations are different. For example:
Then.the(quant).expects_that(the_html_table("transactionTable"), is_not_present());
Then.the(quant).expects_that(the_equity_chart(), is_not_displayed());
The is_not_present() check that the table is null, but the is_not_displayed() checks that the number of images is zero. Frankly, I'd rather have a single method. Less ambiguity in usage, and would probably make for smoother reading, too.
Curious to hear your thoughts,
Thanks!
Eric