Each of my scenarios reads a sample in a file and copy them in a text field:
def sample(name)
IO.read("spec/samples/#{name}.bib")
end
feature 'Import a record' do
scenario 'from JabRef' do
fill_in 'bibtex', :with => sample('jabref')
in_dialog.click_button 'Import'
...
end
end
This worked fine, until one of the sample had a tabulation in it: while a manual copy and paste worked, the test failed.
From other questions [1], I have understood that interpreting \t
and \n
as keyed inputs is supposed to be a "feature". Is there a way to deactivate this feature and just "paste" the content?