Sha256: b60328c46ccca48e0b9aa64b0c6d224a8389e616c9915a0b664b359fb1f5e2c3
Contents?: true
Size: 782 Bytes
Versions: 1
Compression:
Stored size: 782 Bytes
Contents
require 'spec_helper' describe Object do context "#attr_boolean" do subject do obj = Object.new klass = (class << obj; self; end) klass.send(:attr_boolean, :new_record) obj end it("responds_to? accessor?") { subject.should respond_to(:new_record?) } it("responds_to? accessor=") { subject.should respond_to(:new_record=) } end context "#dup?" do context "with an undupable object" do subject { nil } it("returns itself") { subject.dup?.should be_equal(nil) } end context "with a dupable object" do subject { "hello" } it("does not return itself") { subject.dup?.should_not be_equal(subject) } it("== itself") { subject.dup?.should == subject } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sc-core-ext-1.1.1 | spec/sc-core-ext/object_spec.rb |