Reputation: 447
I've recently got into RSpec and i'm writing some tests for my code, one of things my code has is a section where it starts by going if category.name.includes?(matcher)
and then it does something, running this code in production is fine however whenever i'm testing that piece of code with RSpec I get the following error:
undefined method 'includes?' for "category21":String
To clear some things up, my factories do clearly define the categories name, i'm mainly wondering if I need to include some form of library to get it to play nicely?
Thanks, Grant
Upvotes: 0
Views: 42