spec/input_spec.rb in watir-webdriver-0.6.4 vs spec/input_spec.rb in watir-webdriver-0.6.5

- old
+ new

@@ -7,33 +7,39 @@ end describe "#to_subtype" do it "returns a CheckBox instance" do e = browser.input(:xpath => "//input[@type='checkbox']").to_subtype - e.should be_kind_of(Watir::CheckBox) + expect(e).to be_kind_of(Watir::CheckBox) end it "returns a Radio instance" do e = browser.input(:xpath => "//input[@type='radio']").to_subtype - e.should be_kind_of(Watir::Radio) + expect(e).to be_kind_of(Watir::Radio) end it "returns a Button instance" do es = [ browser.input(:xpath => "//input[@type='button']").to_subtype, browser.input(:xpath => "//input[@type='submit']").to_subtype ] - es.all? { |e| e.should be_kind_of(Watir::Button) } + es.all? { |e| expect(e).to be_kind_of(Watir::Button) } end it "returns a TextField instance" do e = browser.input(:xpath => "//input[@type='text']").to_subtype - e.should be_kind_of(Watir::TextField) + expect(e).to be_kind_of(Watir::TextField) end it "returns a TextField instance" do e = browser.input(:xpath => "//input[@type='file']").to_subtype - e.should be_kind_of(Watir::FileField) + expect(e).to be_kind_of(Watir::FileField) + end + end + + describe "#type" do + it "returns an email type" do + expect(browser.input(:name => "html5_email").type).to eq 'email' end end end