Responsive Ad Area

Share This Post

test

ActiveRelation Query is empty in Rails System Test, but works interactive

Works in interactive session, but fails in Rails System test:

Using byebug, this one unexpectedly returns empty
@item.children.where(done: false)

If I skip the ActiveRelation, like this, I see the object correctly
@item.children

This one unexpectedly returns 1 record
@item.children.where.not(done:false)


ActiveRelation Query is empty in Rails System Test, but works interactive
ActiveRelation Query is empty in Rails System Test, but works interactive
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar