rspec - Rails model specs passing, Sidekiq spec failing -
I am creating a rail (4.1.0) which runs the election. In each survey, there are for Milan and seat At the end of a survey without the specs, I have to show the winner. I am using a sidekick worker to handle the end of the survey. It does a lot of things, but here's the code in question: There is no space pass for this worker: When I run this idea, I will find: Nearly OK I have hacked a lot of test codes, so ma Ph, do not assume this is a problem! In addition, when the workers actually walk in development mode, then the seat. Thanks Sideshow has nothing to do with your problem So that the problem is with the RSPC and the Active Recorder. For example, drag the code out of the display method and keep it straight, it should still be unsuccessful. I suspect that the examples are stale and # need to be reloaded to take the database up. Make up the changes made in #formform. n matching my model:
Class EndOfPollWorker includes Sidekick :: Worker DRF poll (poll_id) poll = place (: id poll_id) poll.matchups Do .each | matchup | To grab the winning seat winning seat, it's declared as a winning winning_seat.declare_as_winner end and end.
'Code_helper' is required before 'endoffolbokar' # For each simple question, For each entry, matchup @ paul = poll.bild_paul and context 'prepares a matchup when voting ends' winner = @ poll.matchups.map {| Matchup | Matchup.seats.first} @Loggers = @ poll.matchups.map {| Matchup | matchup.seats.last} winners. Seat | Seat.number_of_votes = 1 end @ poll.save! @job = Andopoloborker. Time ends 'It updates every matchup' dot @ job .form (@ poll.id) winner of the winner. (Seat.Is_Winner?) Is expected (this is true) Finally 'this is every matchup' dot @ job ' ('Poll.id) @ losers.each do | The losers of the seat do not update. (Seat.is_winner?) Should be (false) and end and end and end
AndOfPower Updating the winner of each matchup when the election ends, Failure / Error: My specs (seat.is_winner?) May be true for seat and matching model
Comments
Post a Comment