Sha256: 3b347f2ce99b02efb5b155f54e72b237ec60b09990c8a51ea3d0e063b87b93e2

Contents?: true

Size: 720 Bytes

Versions: 4

Compression:

Stored size: 720 Bytes

Contents

require 'rails_helper'

module Commontator
  RSpec.describe ControllerIncludes, type: :lib do
    it 'must add commontator_thread_show to ActionController instances' do
      expect(ActionController::Base.new.respond_to?(:commontator_thread_show,
                                                    true)).to eq true
      expect(DummyModelsController.new.respond_to?(:commontator_thread_show,
                                                   true)).to eq true
    end

    it 'must add shared helper to ActionController and subclasses' do
      expect(ActionController::Base.helpers).to respond_to(:commontator_thread)
      expect(DummyModelsController.helpers).to respond_to(:commontator_thread)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
commontator-5.1.0 spec/lib/commontator/controllers_spec.rb~
commontator-4.11.0 spec/lib/commontator/controllers_spec.rb~
commontator-4.10.5 spec/lib/commontator/controller_includes_spec.rb
commontator-4.10.4 spec/lib/commontator/controller_includes_spec.rb