# Assert\_select - seemingly unrelated error?

**URL:** <https://www.ruby-forum.com/t/assert-select-seemingly-unrelated-error/112928>\
**Category:** Rails\
**Created:** [August 24, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/assert-select-seemingly-unrelated-error/112928 "2007-08-24T16:04:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 24, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/assert-select-seemingly-unrelated-error/112928/1 "2007-08-24T16:04:00Z")

</div>

I’m getting

1. Error:  
test\_loan\_to\_bad\_user(AdminControllerTest):  
RuntimeError: expected \> (got “@attributes={“description\_id”=\>” for  
\<Device:0x7ef70994 @attributes={“description\_id”=\>, {})

from an  
assert\_select “div.badborrower”

statement. I’m trying to test for existence of a

....

Why is it expecting ‘\>’ at all (surely angle brackets should be  
matched?), and what has that got to do with my devices?

Rails 1.2.3 on cygwin, WinXP.

```
    Thank you,
    Hugh
```

---

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 24, 2007, 6:23pm UTC](https://www.ruby-forum.com/t/assert-select-seemingly-unrelated-error/112928/2 "2007-08-24T18:23:25Z")

</div>

On Fri, 24 Aug 2007, Hugh S. wrote:

> I’m getting
> 
> 1. Error:  
> test\_loan\_to\_bad\_user(AdminControllerTest):  
> RuntimeError: expected \> (got “@attributes={“description\_id”=\>” for \<Device:0x7ef70994 @attributes={“description\_id”=\>, {})
> 
> from an  
> assert\_select “div.badborrower”

Turns out I’d forgotten to wrap some stuff in h() so was getting  
dodgy HTML. So I’ve fixed this. Thanks anyway to anyone reading 🙂

```
    Hugh
```
