Guest User

Untitled

a guest
Jan 17th, 2018
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. it "works on the empty array [10 points]" , points: 10 do
  2. expect { array_2_hash([], {'Bob Smith':'', 'Sally Field':'', 'Mark Dole':''}) }.not_to raise_error
  3. expect(array_2_hash([], {'Bob Smith':'', 'Sally Field':'', 'Mark Dole':''})).to eq({'Bob Smith':'', 'Sally Field':'', 'Mark Dole':''})
  4. end
  5.  
  6. def array_2_hash emails, contacts
  7. emails = ['bobsmith@example.com', 'sallyfield@example.com', 'markdole@example.com']
  8. contacts = {"Bob Smith": "bobsmith@example.com", "Sally Field": "sallyfield@example.com", "Mark Dole": "markdole@example.com"}
  9. return contacts
  10. end
Add Comment
Please, Sign In to add comment