Sha256: 57de8de050a402243c0a97a9b1f703d22d67197483a087c31cc786677f0b9b89

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

require 'spec_helper'

module Tasuku
  describe Taskables::Taskable::Submission do
    class Answer

      # This is probably a bad idea, but otherwise Ruby will complain that there's
      # no 'has_one' method on my stub and I don't really care about that.
      class << self
        def method_missing *args; end
      end

      include Taskables::Taskable::Submission

      def question
        'foo'
      end

      request is: :question
    end

    describe '.request' do

      it 'aliases a given relation to request' do
        expect(Answer.new.request).to eq 'foo'
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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