Sha256: def947872b73fc4d6a11442fffa8243e7be837148d1977956e4029f214d9f4ca
Contents?: true
Size: 551 Bytes
Versions: 17
Compression:
Stored size: 551 Bytes
Contents
RSpec::Matchers.define :have_value do |expected| match do |variable| selector_class = variable.sub("$", ".") @value_attribute = ParserSupport.parser.find_by_selector(selector_class)[0] unless @value_attribute.nil? actual_value = @value_attribute.split(":")[1].strip.sub(";", "") actual_value == expected end end failure_message_for_should do |variable_name| value_attribute = @value_attribute.to_s %{Expected variable #{variable_name} to have value "#{expected}". Had "#{value_attribute}".} end end
Version data entries
17 entries across 17 versions & 3 rubygems