Testing CodeMirror Editor with Capybara & RSpec
CodeMirror converts a given
textarea into the editor field and hides the
textarea which causes the test to have a tough time entering text into it.
fill_in_editor_field(text) method below for how you can enter text into CodeMirror in your feature specs, and the
have_editor_display(options) method for how you can assert the editor is displaying the expected text:
This solution has been tested in Chrome 54 on Mac OS X.