Sha256: a32708d654e3d86ab9d96f38025afe3b6f3d40bdd74a48360c0d065fc583ca23
Contents?: true
Size: 754 Bytes
Versions: 2
Compression:
Stored size: 754 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sc-core-ext-1.2.1 | spec/sc-core-ext/object_spec.rb |
sc-core-ext-1.2.0 | spec/sc-core-ext/object_spec.rb |