Created
October 25, 2015 21:54
-
-
Save mycargus/e79ad72a29b9b2811ff2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| describe FunctionalInterface do | |
| before :all do | |
| @implementations = | |
| ObjectSpace.each_object(Class) | |
| .select { |klass| klass < FunctionalInterface } | |
| end | |
| it "should enforce that the interface is implemented" do | |
| @implementations.each do |klass| | |
| entity = klass.new | |
| expect { entity.do_thing }.to not_raise | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment