For Capybara, use this step:
Then /^"([^"]*)" should be a disabled option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector|
with_scope(selector) do
field_labeled(field).find(:xpath, ".//option[text() = '#{value}'][@disabled]").should be_present
end
end
Posted by Dominik Schöler to makandra dev (2013-08-02 06:35)