spec/element_spec.rb in page_magic-1.2.1 vs spec/element_spec.rb in page_magic-1.2.3

- old
+ new

@@ -124,9 +124,16 @@ it 'calls the browser_element passing on all args' do expect(browser_element).to receive(:select).with(:args) subject.select :args end end + + context 'Capybara element does not respond to the method' do + it 'raises an error' do + expected_message = (described_class::EVENT_NOT_SUPPORTED_MSG % 'click') + expect { subject.click }.to raise_error(NotSupportedException, expected_message) + end + end end end describe 'hooks' do subject do