diff options
Diffstat (limited to 'spec/rubyspec/library/delegate/delegator/complement_spec.rb')
-rw-r--r-- | spec/rubyspec/library/delegate/delegator/complement_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/rubyspec/library/delegate/delegator/complement_spec.rb b/spec/rubyspec/library/delegate/delegator/complement_spec.rb new file mode 100644 index 0000000000..877a6e99c6 --- /dev/null +++ b/spec/rubyspec/library/delegate/delegator/complement_spec.rb @@ -0,0 +1,11 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require File.expand_path('../../fixtures/classes', __FILE__) + +describe "Delegator#~" do + it "is delegated" do + base = mock('base') + delegator = DelegateSpecs::Delegator.new(base) + base.should_receive(:~).and_return(:foo) + (~delegator).should == :foo + end +end |