Hi I am working on RoR project with ruby-2.5.0 and Rails 5. I have a method on controller which returns an array and the array contains a string and an object of a Reciept Model as follows:
["IGA", #<Reciept id: 1, name: "IGA", reciept_date: "2006-02-18 16:25:00", user_id: 1, created_at: "2018-04-07 11:53:33", updated_at: "2018-04-07 11:53:33">]
In my rspec i want to compare this array as follows:-
it { expect(described_class.find_store(params,user_id)).to eq(["IGA", #<Reciept id: 1, name: "IGA", reciept_date: "2006-02-18 16:25:00", user_id: 1, created_at: "2018-04-07 11:53:33", updated_at: "2018-04-07 11:53:33">]) }
It given syntax error as inside the array there is a '#' symbol so it comments my code. Please help me how can i compare this array. Thanks in advance.