Sha256: 1189cd024ea3c7af6d97704587a2fe27a027440906c6b514c6c8ae888195ab75
Contents?: true
Size: 417 Bytes
Versions: 9
Compression:
Stored size: 417 Bytes
Contents
require "spec_helper" describe Object, ".attr_id_query" do it "creates id query methods" do klass = Class.new do attr_id_query :baz?, :boink? attr_accessor :baz_id end example = klass.new refute example.baz? example.baz_id = 123 assert example.baz? end it "requires a trailing questionmark" do lambda { Object.attr_id_query(:foo) }.must_raise ArgumentError end end
Version data entries
9 entries across 9 versions & 1 rubygems