Sha256: 936cb931f5167a023107fbacb1d85bd9e09d01a1ae1e37b20474ef6604f10ac6
Contents?: true
Size: 405 Bytes
Versions: 18
Compression:
Stored size: 405 Bytes
Contents
module WithExpectations extend ActiveSupport::Concern included do serialize :expectations end def expectations_yaml self.expectations.to_yaml end def expectations_yaml=(yaml) self.expectations = YAML.load yaml end def expectations=(expectations) self[:expectations] = expectations.map(&:stringify_keys) end def expectations self[:expectations] || [] end end
Version data entries
18 entries across 18 versions & 1 rubygems