I am learning RSpec testing. Now I want to write about given below code's rspec , but I can't.
module FrontendHelper
def scholarship_style_change(scholarship)
array = []
if scholarship.discount >= 50 && scholarship.id.odd?
array = ['OliveDrab', 'box box-border']
elsif scholarship.discount >= 25 && scholarship.id.even?
array = ['FireBush', 'box box-theme']
else
array = ['Mojo', 'box box-dark']
end
array
end
end
Can anyone help me to write this method's rspec test code ?
Here is the test code of the method: