# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
# frozen_string_literal: true

require 'kreuzberg'
require 'json'
require 'spec_helper'

RSpec.describe 'code' do
  it 'code_shebang_detection: Test language detection from shebang line via bytes input' do
    result = Kreuzberg.extract_file_sync('code/script.sh', 'text/x-source-code')
    expect(result.mime_type.to_s.strip).to eq('text/x-source-code'.strip)
    expect(result.content.length).to be >= 10
    expect(result.content.to_s).to include('build')
    expect(result.content.to_s).to include('clean')

  end
end
