Sha256: eba620e2014b6891072fd09a4521671c32738c48ddec02da268f60fb6e061d01
Contents?: true
Size: 1.19 KB
Versions: 2
Compression:
Stored size: 1.19 KB
Contents
module Pickles class << self def configure yield config end def config @_configuration ||= Pickles::Config.new end end end class Pickles::Config using HashStringifyKeys attr_accessor :css_node_map, :xpath_node_map, :log_xhr_response def initialize @css_node_map = {} @log_xhr_response = false @xpath_node_map = {} @fill_tag_steps_map = { 'select' => FillIN::Select } @check_tag_steps_map = { 'text' => CheckIn::Text } end def css_node_map=(map) raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash) @css_node_map = map.stringify_keys end def xpath_node_map=(map) raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash) @xpath_node_map = map.stringify_keys end def fill_tag_steps_map=(map) raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash) @fill_tag_steps_map.merge!(map) end def check_tag_steps_map=(map) raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash) @check_tag_steps_map.merge!(map) end def step_by_tag(tag) @fill_tag_steps_map[tag] end def check_step_by_tag(tag) @check_tag_steps_map[tag] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pickles-0.1.10 | lib/cucumber/pickles/config.rb |
pickles-0.1.9 | lib/cucumber/pickles/config.rb |