Last active
August 29, 2015 13:59
-
-
Save mkaschenko/10949710 to your computer and use it in GitHub Desktop.
Rspec and predicates
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
class Dog | |
def hungry? | |
true | |
end | |
def full? | |
false | |
end | |
end | |
describe Dog do | |
it 'is hungry' do | |
expect(subject).to be_hungry | |
end | |
it 'is not full' do | |
expect(subject).to_not be_full | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment