Wednesday, 7 August 2013

i get an error in shoulda testing for self.submit_all

i get an error in shoulda testing for self.submit_all

I'm so new in testing ruby on rails, can someone explain to me on how to
code it in shoulda test.
def self.submit_all
update_all("submitted = 1","submitted = 0")
end
def
self.look_for_snapshots_or_allocations_with_no_sponsor_name_and_amount_zero
alloc = Allocation.current.where(:amount => 0)
alloc.update_all(:submitted => 1)
end

No comments:

Post a Comment