Need help with assert_select semantics

I have this type of table row generated in a view:




CAD
USD
2009-04-05
TEST

1.184273

features test

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?

James B. wrote:

So, what is it that I am misapprehending with assert_select?

That one may not have a ‘.’ form part of a class value.

‘.base_rate_is_0.8444’ s/b
‘.base_rate_is_0_8444’