Sha256: 58571db12462544b90440fff61a8487772d6db763707362cc431a33f8f94a589

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

require 'spec_helper'

module Tasuku
  describe Taskables::Question do
    let!(:user)     { create :user }
    let!(:question) { create :question_with_options }
    let!(:answer)   { create :question_answer, author: user, options: [question.options.first, question.options.second] }

    describe '#answers' do
      let!(:other_question) { create :question_with_options }
      let!(:other_answer)   { create :question_answer, author: user, options: [other_question.options.first, other_question.options.second] }

      it 'should derive its answers' do
        expect(question.answers.count).to eq 1
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tasuku-1.1.0 spec/models/tasuku/taskables/question_spec.rb
tasuku-1.0.1 spec/models/tasuku/taskables/question_spec.rb
tasuku-0.1.1 spec/models/tasuku/taskables/question_spec.rb
tasuku-0.1.0 spec/models/tasuku/taskables/question_spec.rb