Sha256: ab70e9b2678e066452437c2a5e9dbe329ca5ca4661b40b526edf4271aa8e9197
Contents?: true
Size: 811 Bytes
Versions: 12
Compression:
Stored size: 811 Bytes
Contents
require 'spec_helper' require 'druid/elements' describe Druid::Elements::FileField do describe "when mapping how to find an element" do it "should map watir types to same" do [:class, :id, :index, :name, :xpath, :title].each do |t| identifier = Druid::Elements::FileField.identifier_for t => 'value' expect(identifier.keys.first).to eql t end end end describe "interface" do let(:element) { double 'element' } let(:file_field) { Druid::Elements::FileField.new(element) } it "should set its' value" do expect(element).to receive(:set).with('a file') file_field.value = 'a file' end it "should register as type :file" do expect(Druid::Elements.element_class_for(:input, :file)).to be Druid::Elements::FileField end end end
Version data entries
12 entries across 12 versions & 1 rubygems