Sha256: 7c794a1e81a3d3017703607eec8fe2419fcf15d69618b6c715aa1c234e6eb60a
Contents?: true
Size: 412 Bytes
Versions: 6
Compression:
Stored size: 412 Bytes
Contents
require "spec_helper" describe Object, ".attr_query" do it "creates attribute query methods" do klass = Class.new do attr_query :flurp? attr_accessor :flurp end example = klass.new refute example.flurp? example.flurp = "!" assert example.flurp? end it "requires a trailing questionmark" do _(lambda { Object.attr_query(:foo) }).must_raise ArgumentError end end
Version data entries
6 entries across 6 versions & 1 rubygems