spec/fixtures/ethernet_frame.rb in dm-validations-0.10.2 vs spec/fixtures/ethernet_frame.rb in dm-validations-1.0.0.rc1

- old
+ new

@@ -1,7 +1,7 @@ module DataMapper - module Validate + module Validations module Fixtures # for pedants: we refer to DIX Ethernet here class EthernetFrame @@ -30,14 +30,14 @@ # # Validations # - validates_length :destination_mac, :source_mac, :equals => 6 - validates_length :ether_type, :equals => 2 - validates_length :payload, :min => 46, :max => 1500, :unless => :link_support_fragmentation + validates_length_of :destination_mac, :source_mac, :equals => 6 + validates_length_of :ether_type, :equals => 2 + validates_length_of :payload, :min => 46, :max => 1500, :unless => :link_support_fragmentation # :is is alias for :equal - validates_length :crc, :is => 4 + validates_length_of :crc, :is => 4 def self.valid_instance # these are obvisouly not bits, and not in hexadecimal # format either, but give fixture models some slack attributes = {