Testing Rails - Cucumber vs CKEditor

Submitted by aaron on Thu, 06/16/2011 - 12:45

 How do you get a feature to set the value of a ckeditor field so that it can run under any driver (javascript or not)?

#value = "Thing to set body to..."
begin
  page.evaluate_script("CKEDITOR.instances.discussion_body_editor.setData('<p>#{value.gsub("'","\\\\'")}</p>');")
rescue Capybara::NotSupportedByDriverError
  And %{I fill in "discussion_body_editor" with "#{value}"}
end

 
 

Copyright © 2011, Aaron Blondeau

Drupal theme by Kiwi Themes.