Sha256: 0cd4fc5ff10ef3046fb5b52fcab11a260a5871bbfb0693e7f0bacce09d5f37d6
Contents?: true
Size: 739 Bytes
Versions: 15
Compression:
Stored size: 739 Bytes
Contents
module InputModeMatchers { :hiragana => '-wap-input-format:"*<ja:h>"', :hankaku => '-wap-input-format:"*<ja:hk>"', :alphabetic => '-wap-input-format:"*<ja:en>"', :numeric => '-wap-input-format:"*<ja:n>"' }.each do |mode, style| define_method("be_docomo_#{mode}") { DocomoInputMode.new style } end class DocomoInputMode def initialize(expected) @expected = expected end def matches?(target) @target = target @target["style"].eql?(@expected) end def failure_message_for_should "expected #{@target.native} to have style='#{@expected}'" end def failure_message_for_should_not "expected #{@target.native} not to have style='#{@expected}'" end end end
Version data entries
15 entries across 15 versions & 1 rubygems