Sha256: 0d4dae4863868201b0b30d4e30cebbeff9f0dc301f12ac117e7dee084eddd11c

Contents?: true

Size: 706 Bytes

Versions: 16

Compression:

Stored size: 706 Bytes

Contents

require_relative '../../test_helper'
module Qwester

  class QuestionnaireTest < ActiveSupport::TestCase
    def setup
      @questionnaire = Questionnaire.find(1)
    end

    # Overriding this method, so want to make sure default behaviour still works
    # Tests for methods over-riding this are in other test, e.g. questionnaires_question_test.rb
    def test_method_missing
      assert_raise NoMethodError do
        @questionnaire.no_such_method
      end
    end
    
    def test_habtm_joins_to_answer_store
      @questionnaire.answer_stores << AnswerStore.first
    end
    
    def test_presentation
      assert_equal([Presentation.find(1)], @questionnaire.presentations)
    end
  end
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
qwester-0.5.0 test/unit/qwester/questionnaire_test.rb
qwester-0.4.0 test/unit/qwester/questionnaire_test.rb
qwester-0.3.5 test/unit/qwester/questionnaire_test.rb
qwester-0.3.4 test/unit/qwester/questionnaire_test.rb
qwester-0.3.3 test/unit/qwester/questionnaire_test.rb
qwester-0.3.2 test/unit/qwester/questionnaire_test.rb
qwester-0.3.1 test/unit/qwester/questionnaire_test.rb
qwester-0.3.0 test/unit/qwester/questionnaire_test.rb
qwester-0.2.2 test/unit/qwester/questionnaire_test.rb
qwester-0.2.1 test/unit/qwester/questionnaire_test.rb
qwester-0.2.0 test/unit/qwester/questionnaire_test.rb
qwester-0.1.4 test/unit/qwester/questionnaire_test.rb
qwester-0.1.3 test/unit/qwester/questionnaire_test.rb
qwester-0.1.2 test/unit/qwester/questionnaire_test.rb
qwester-0.1.1 test/unit/qwester/questionnaire_test.rb
qwester-0.1.0 test/unit/qwester/questionnaire_test.rb