<commit_before>require 'active_support/all'
require 'action_controller'
require 'cancan/ability'
require 'cancan/controller_additions'
require 'cancan/exceptions'
require 'cancan/rule'
require 'cancanright/ability'
require 'cancanright/controller_additions'
require 'cancanright/error'
require 'cancanright/rule'
require 'spec_helper'

describe 'CanCanRight::ControllerAdditions' do
  subject(:controller) {
    class Ability
      include CanCanRight::Ability

      def initialize(user)

      end
    end

    class Controller < ActionController::Base
      def rights_from
        nil
      end

      private

      def params
        { controller: 'controller', action: 'action' }<commit_msg>Get test working on it's own<commit_after>require 'active_support/all'
require 'action_controller'
require 'cancan/ability'
require 'cancan/controller_additions'
require 'cancan/exceptions'
require 'cancan/rule'
require 'cancanright/ability'
require 'cancanright/controller_additions'
require 'cancanright/error'
require 'cancanright/rule'
require 'active_record'
require 'spec_helper'

describe 'CanCanRight::ControllerAdditions' do
  subject(:controller) {
    class Ability
      include CanCanRight::Ability

      def initialize(user)

      end
    end

    class Controller < ActionController::Base
      def rights_from
        nil
      end

      private

      def params
        { controller: 'controller', action: 'action' }
{'fraction_non_alphanumeric': 0.08292682926829269, 'fraction_numerical': 0.0, 'mean_word_length': 4.056338028169014, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4432061', 'n_tokens_mistral': 431, 'n_tokens_neox': 417, 'n_words': 103}