Sha256: 197b48cd1b14c4d1579105e0af605d25a41756faf1d3820fefad88b8acf56248

Contents?: true

Size: 713 Bytes

Versions: 3

Compression:

Stored size: 713 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)
      DummyModelsController.helpers.must_respond_to :commontator_thread
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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