Rename trait with_answers to yes_no

We barely use this trait. In the votation type spec we're probably using
it wrong, and in the answer spec we assume one of the answers is going
to be "Yes".

The name `yes_no` is more expressive, since it makes it clear what the
answers are.
This commit is contained in:
Javi Martín
2019-09-24 02:09:35 +02:00
parent aeb1655961
commit 19a41eb651
4 changed files with 8 additions and 8 deletions

View File

@@ -419,8 +419,8 @@ describe "Stats" do
poll = create(:poll)
question1 = create(:poll_question, :with_answers, poll: poll)
question2 = create(:poll_question, :with_answers, poll: poll)
question1 = create(:poll_question, :yes_no, poll: poll)
question2 = create(:poll_question, :yes_no, poll: poll)
create(:poll_answer, question: question1, author: user1)
create(:poll_answer, question: question2, author: user1)