Skip to content

Instantly share code, notes, and snippets.

@mkaschenko
Last active August 29, 2015 13:59
Show Gist options
  • Save mkaschenko/10949710 to your computer and use it in GitHub Desktop.
Save mkaschenko/10949710 to your computer and use it in GitHub Desktop.
Rspec and predicates
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