Sha256: a61fa0b45567b0bc3c881ce9dbcbc4693beec003c46ccd842257f44e7508a1aa

Contents?: true

Size: 700 Bytes

Versions: 34

Compression:

Stored size: 700 Bytes

Contents

require 'active_support/test_case'
require 'action_dispatch/testing/test_process'

class ActiveSupport::TestCase
  include ActionDispatch::TestProcess
  
  def new_attachment(data = nil)
    data ||= fixture_file_upload('files/rails.tar.gz', 'application/x-gzip')
    
    Ckeditor::AttachmentFile.new(:data => data)
  end
  
  def create_attachment(data = nil)
    attachment = new_attachment(data)
    attachment.save!
    attachment
  end
  
  def new_picture(data = nil)
    data ||= fixture_file_upload('files/rails.png', 'image/png')
    
    Ckeditor::Picture.new(:data => data)
  end
  
  def create_picture(data = nil)
    picture = new_picture(data)
    picture.save!
    picture
  end
end

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
glebtv-ckeditor-4.2.1.5 test/support/helpers.rb
glebtv-ckeditor-4.2.1.4 test/support/helpers.rb
glebtv-ckeditor-4.2.1.3 test/support/helpers.rb
glebtv-ckeditor-4.2.1.2 test/support/helpers.rb
glebtv-ckeditor-4.2.1.1 test/support/helpers.rb
glebtv-ckeditor-4.2.1 test/support/helpers.rb
glebtv-ckeditor-4.1.1.7 test/support/helpers.rb
glebtv-ckeditor-4.1.1.6 test/support/helpers.rb
ckeditor-4.0.6 test/support/helpers.rb
glebtv-ckeditor-4.1.1.5 test/support/helpers.rb
glebtv-ckeditor-4.1.1.4 test/support/helpers.rb
glebtv-ckeditor-4.1.1.3 test/support/helpers.rb
glebtv-ckeditor-4.1.1.2 test/support/helpers.rb
glebtv-ckeditor-4.1.1.1 test/support/helpers.rb
glebtv-ckeditor-4.1.1 test/support/helpers.rb
ckeditor-4.0.4 test/support/helpers.rb
glebtv-ckeditor-4.0.2.7 test/support/helpers.rb
glebtv-ckeditor-4.0.2.6 test/support/helpers.rb
glebtv-ckeditor-4.0.2.5 test/support/helpers.rb
glebtv-ckeditor-4.0.2.4 test/support/helpers.rb