require "rails_helper"

describe ContextualLinkHelpers do
  describe "#action_to_icon" do
    it "returns the action parameter if no action matches" do
      expect(helper.action_to_icon('unknown action')).to eq 'unknown action'
    end
  end

  describe "#contextual_links" do
    it "should work with block returning nil" do
      expect{
        helper.contextual_links('action') do
          nil
        end
      }.to_not raise_exception
    end
  end
end

Add spec to test for contextual_links method properly handling nil block.
Add spec to test for contextual_links method properly handling nil block.
