Sha256: 690239bfcd8b612bd5210a9bed2dc8d8f11fc88a445d32d4ab19d67f18bcc10e
Contents?: true
Size: 420 Bytes
Versions: 6
Compression:
Stored size: 420 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
6 entries across 6 versions & 1 rubygems