<commit_before>require 'spec_helper'

describe DeviceOramaHive do
  describe '#find_or_create_by' do
    let(:valid_options) {
      {
        hostname: 'hive_host',
        ip: '10.10.10.10'
      }
    }

    it 'creates an attribute instance' do
      expect(DeviceOramaHive.find_or_create_by(valid_options)).to be_an Attribute
    end
  end
end<commit_msg>Pass ActionController::Parameters instead of hash<commit_after>require 'spec_helper'

describe DeviceOramaHive do
  describe '#find_or_create_by' do
    let(:valid_options) {
      ActionController::Parameters.new({
        hostname: 'hive_host',
        ip: '10.10.10.10'
      })
    }

    it 'creates an attribute instance' do
      expect(DeviceOramaHive.find_or_create_by(valid_options)).to be_an DeviceOramaHive::Attribute
    end
  end
end
{'fraction_non_alphanumeric': 0.09293680297397769, 'fraction_numerical': 0.01982651796778191, 'mean_word_length': 3.391304347826087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4115657', 'n_tokens_mistral': 280, 'n_tokens_neox': 267, 'n_words': 54}