I’ve written and used similar macros before. One thing that I’ve seen some do, and have mixed feelings about, is directly grabbing the lv variable from the calling site. This is nice because it lets you write really compact tests
click("Edit Profile")
assert_view("h1", "Editing profile")
But the downside is that they’re “magical,” they grab the LV or HTML out of their call site with no apparent way of doing so to the caller. Depending on your teams proficiency and feeling towards this, it can be a major downside.
I’m gonna collect some more of these tips into a second article ![]()






















