Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. require_relative 'List'
  2.  
  3. describe List do
  4. let(:list) { List.new }
  5.  
  6. it "stores the list items given on initialization" do
  7. expect(List.get_items).to eq ["do the dishes", "mow the lawn"]
  8. end
  9.  
  10. it "adds an item to the list" do
  11. list.add_item("mop")
  12. expect(List.get_items).to eq ["do the dishes", "mow the lawn", "mop"]
  13. end
  14.  
  15. it "deletes an item" do
  16. list.delete_item("do the dishes")
  17. expect(List.get_items).to eq ["mow the lawn"]
  18. end
  19.  
  20. it "retrieves an item by index" do
  21. expect(List.get_item(0)).to eq ["do the dishes"]
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement