This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement #respond_to? in addition to #method_missing
[#1419 state:resolved]
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'spec_helper' | ||
|
||
describe 'DataMapper::Validations::ValidationErrors#respond_to?' do | ||
|
||
subject { DataMapper::Validations::ValidationErrors.new(Object.new) } | ||
|
||
it 'should look for the method in self' do | ||
subject.should respond_to(:full_messages) | ||
end | ||
|
||
it 'should delegate lookup to the underlying errors hash' do | ||
subject.should respond_to(:size) | ||
end | ||
|
||
end | ||
|