<commit_before>require 'spec_helper'

describe RetinaRails::Strategies::Paperclip do

  ##
  # Store image so we can run tests against it
  #
  def upload!
    @upload = PaperclipUpload.new(:avatar => File.open("#{fixture_path}/images/avatar.jpeg"))
    @upload.save
  end

  ##
  # Return image path so we can open image
  #
  def image_path
    "#{File.dirname(__FILE__).gsub('spec/strategies', 'public')}#{@upload.avatar.url(:big)}"
  end

  ##
  # Make sure image get's destroyed after each test
  #
  after(:each) do
    @upload.destroy
  end

  context 'defaults' do

    before(:each) do
      PaperclipUpload.class_eval do
        has_attached_file :avatar,<commit_msg>Make sure tests pass on Travis<commit_after>require 'spec_helper'

describe RetinaRails::Strategies::Paperclip do

  ##
  # Store image so we can run tests against it
  #
  def upload!
    @upload = PaperclipUpload.new(:avatar => File.open("#{fixture_path}/images/avatar.jpeg"))
    @upload.save
  end

  ##
  # Return image path so we can open image
  #
  def image_path
    "#{File.dirname(__FILE__).gsub('spec/strategies', 'public')}#{@upload.avatar.url(:big)}"
  end

  ##
  # Make sure image get's destroyed after each test
  #
  after(:each) do
    @upload.destroy if @upload
  end

  context 'defaults' do

    before(:each) do
      PaperclipUpload.class_eval do
        has_attached_file :avatar,
{'fraction_non_alphanumeric': 0.12083936324167872, 'fraction_numerical': 0.0, 'mean_word_length': 3.49025974025974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3377718', 'n_tokens_mistral': 476, 'n_tokens_neox': 460, 'n_words': 116}