Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # class code
- class Category
- def tags_raw
- tags.split(",")
- end
- end
- class OtherClass
- attr_accessor :category
- def params
- {
- tags: category.tags_raw
- }
- end
- end
- # Other class spec
- expect(params[:tags]).to eq(category.tags_raw)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement