From c530d0faf064d561bf7755c55a34921572d343ef Mon Sep 17 00:00:00 2001 From: eregon Date: Wed, 20 Sep 2017 20:18:52 +0000 Subject: Move spec/rubyspec to spec/ruby for consistency * Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- .../library/delegate/delegator/untrust_spec.rb | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 spec/ruby/library/delegate/delegator/untrust_spec.rb (limited to 'spec/ruby/library/delegate/delegator/untrust_spec.rb') diff --git a/spec/ruby/library/delegate/delegator/untrust_spec.rb b/spec/ruby/library/delegate/delegator/untrust_spec.rb new file mode 100644 index 0000000000..e2bbf1b294 --- /dev/null +++ b/spec/ruby/library/delegate/delegator/untrust_spec.rb @@ -0,0 +1,23 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require File.expand_path('../../fixtures/classes', __FILE__) + +describe "Delegator#untrust" do + before :each do + @delegate = DelegateSpecs::Delegator.new("") + end + + it "returns self" do + @delegate.untrust.equal?(@delegate).should be_true + end + + it "untrusts the delegator" do + @delegate.__setobj__(nil) + @delegate.untrust + @delegate.untrusted?.should be_true + end + + it "untrusts the delegated object" do + @delegate.untrust + @delegate.__getobj__.untrusted?.should be_true + end +end -- cgit v1.2.3