spec/watirspec/elements/button_spec.rb in watir-6.3.0 vs spec/watirspec/elements/button_spec.rb in watir-6.4.0.rc1

- old
+ new

@@ -224,9 +224,13 @@ end it "raises UnknownObjectException if the button doesn't exist" do expect { browser.button(name: "no_such_name").enabled? }.to raise_unknown_object_exception end + + it "raises ObjectDisabledException if disabled button is clicked" do + expect { browser.button(name: "new_user_submit_disabled").click }.to raise_object_disabled_exception + end end describe "#disabled?" do it "returns false when button is enabled" do expect(browser.button(name: 'new_user_submit')).to_not be_disabled