Advertisement
Guest User

Untitled

a guest
May 27th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. # class code
  2. class Category
  3. def tags_raw
  4. tags.split(",")
  5. end
  6. end
  7.  
  8. class OtherClass
  9.  
  10. attr_accessor :category
  11.  
  12. def params
  13. {
  14. tags: category.tags_raw
  15. }
  16. end
  17. end
  18.  
  19. # Other class spec
  20. expect(params[:tags]).to eq(category.tags_raw)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement