Skip to content

Instantly share code, notes, and snippets.

@alvin2ye
Created October 23, 2009 05:51
Show Gist options
  • Save alvin2ye/216685 to your computer and use it in GitHub Desktop.
Save alvin2ye/216685 to your computer and use it in GitHub Desktop.
response.should have_tag
response.should have_tag("tr[id=finance-record-#{finance_records(:one).id}]") do
with_tag "a", "编辑"
with_tag "a", "删除"
with_tag "a", "勾账"
end
# completed
response.should have_tag("tr[id=finance-record-#{finance_records(:two).id}]") do
without_tag "a", "编辑"
without_tag "a", "删除"
without_tag "a", "勾账"
with_tag "span", /在.*勾账/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment