Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DONE. :D #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions features/animal.feature
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
#Create your feature here

Feature: Animal
As a cat, I should have name, type, and age
and I'm considered old if I'm over 3 years.

Scenario: Cat
Given an animal that is four years old
Then it is named 'Gidget'
And it has a type of 'cat'
And it is considered old
16 changes: 15 additions & 1 deletion features/step_definitions/animal_steps.rb
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
#Delete this comment, here is where you should write your step defs
Given(/^an animal that is four years old$/) do
@animal = Animal.new('Gidget', 'cat', 4)
end

Then(/^it is named 'Gidget'$/) do
expect(@animal.name).to eq 'Gidget'
end

Then(/^it has a type of 'cat'$/) do
expect(@animal.type).to eq 'cat'
end

Then(/^it is considered old$/) do
expect(@animal.old?).to be true
end