I have this type of table row generated in a view:
…
1.184273
…
There are many instances of dorex_rate_line and I wish to select only
those that also contain a class “base_rate_is_0.8444” and I wish to
valiously test that there are: at least, exactly, or at most, N
occurrences.
For the exact match I have tried this:
count = 1
assert_select( ‘.base_rate_is_0.8444’, { :count => count.to_i } )
But that gives this error:
Expected at least 1 element matching “base_rate_is_0.8444”, found 0.
is not true. (Test::Unit::AssertionFailedError)
On the other hand, using exactly the same data I do this and it works as
I anticipate:
count = 1
code = 'USD'
assert_select( '.quote_currency',
{ :maximum => count.to_i,
:text => code })
So, what is it that I am misapprehending with assert_select?