Skip to content
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
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--color
8 changes: 8 additions & 0 deletions zoo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,11 @@ def feed(args={})

end

class Human
include Animal

def acceptable_food
[:bacon, :tacos]
end
end

14 changes: 14 additions & 0 deletions zoo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,17 @@
Zookeeper.new.feed(food: :zeebras, to: lion)
end
end

describe Human do
it "likes bacon" do
Human.new.likes?(:bacon).should eq(true)
end

it "likes tacos" do
Human.new.likes?(:tacos).should eq(true)
end

it "doesn't like bamboo" do
Human.new.likes?(:bamboo).should eq(false)
end
end