Sha256: 076d03728c2c723845a8af4d41366eef324bd104d8c439cd0138d27909d3b478

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

require 'spec_helper'

module Tasks
  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

1 entries across 1 versions & 1 rubygems

Version Path
tasuku-0.0.1 spec/models/tasks/taskables/question_spec.rb