mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
24 lines
520 B
Ruby
24 lines
520 B
Ruby
require "bundler/setup"
|
|
require "minitest/autorun"
|
|
require "mocha/setup"
|
|
require "linguist"
|
|
require 'color-proximity'
|
|
|
|
def fixtures_path
|
|
File.expand_path("../fixtures", __FILE__)
|
|
end
|
|
|
|
def fixture_blob(name)
|
|
name = File.join(fixtures_path, name) unless name =~ /^\//
|
|
Linguist::FileBlob.new(name, fixtures_path)
|
|
end
|
|
|
|
def samples_path
|
|
File.expand_path("../../samples", __FILE__)
|
|
end
|
|
|
|
def sample_blob(name)
|
|
name = File.join(samples_path, name) unless name =~ /^\//
|
|
Linguist::FileBlob.new(name, samples_path)
|
|
end
|