测试 在 RSpec 中如何测试 HTML 代码

shangrenzhidao · June 05, 2014 · Last by chenge replied at June 06, 2014 · 1671 hits

在 Rspec 中需要测试

<tag> 2 posts </tag>

该使用什么方法,文字必须要完全吻合,不能多,也不能少。

assert_select ? 楼主找找吧,我就知道一个这个。。。

capybara

#3 楼 @Shadow 具体使用哪个方法呢,我需要测试精确的字符,比如 2 postss 也有可能吻合。

#4 楼 @shangrenzhidao 自己搜索下吧,求人不如求己。应该网上有的。

You need to Sign in before reply, if you don't have an account, please Sign up first.