Ruby way of writing this spec

18 views
Skip to first unread message

Surya

unread,
Apr 16, 2014, 5:43:05 AM4/16/14
to rs...@googlegroups.com
Hi,

I was wondering if there is nay Ruby way of writing this views spec(without using Capybara/Cucumber/Webrat helpers- should be just in rspec or rspec-rails):

expect(rendered).to include("input class='toggle_m' name='result_configuration[information]' type='checkbox' value='1'>")

expect(rendered).to include("<textarea class=details' disabled='disabled' name=result_configuration[info][]'></textarea>")

Thing is, I need to see if the the checkbox is checked(meaning he value is 1) then textarea should be disabled. Any idea?

--

 Please consider the environment before printing this email.

Regards,
Surya
Reply all
Reply to author
Forward
0 new messages