Sha256: d27474392437261724b42a7aaccea76516c8b1d0facd1c150f1b1eb3dcbcb1c5

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

module Tedium
  module Capybara
    module NodeElement
      def self.included(base)
        base.send(:alias_method, :original_set, :set)
        base.send(:alias_method, :set, :augmented_select)
      end

      def augmented_select(*args)
        if tag_name == "select"
          find(:option_with_value_or_label, args[0]).select_option
        else
          original_set(*args)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tedium-0.0.5 lib/tedium/capybara/node_element.rb