Skip to content

Instantly share code, notes, and snippets.

@ready4god2513
Created September 28, 2012 20:31
Show Gist options
  • Select an option

  • Save ready4god2513/3801926 to your computer and use it in GitHub Desktop.

Select an option

Save ready4god2513/3801926 to your computer and use it in GitHub Desktop.
it "should remove previous answers before adding new ones" do
question.answers.should be_empty
question.answers = [Answer.new(result: result, choices: [choice])]
question.answers.count.should == 1
question.answers = [Answer.new(result: result, choices: [choice2])]
question.answers.count.should == 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment