-
-
Notifications
You must be signed in to change notification settings - Fork 440
Expand file tree
/
Copy pathruby_llm_gemspec_spec.rb
More file actions
23 lines (17 loc) · 800 Bytes
/
ruby_llm_gemspec_spec.rb
File metadata and controls
23 lines (17 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true
require 'spec_helper'
# rubocop:disable RSpec/DescribeClass
RSpec.describe 'ruby_llm.gemspec' do
subject(:gemspec) { Gem::Specification.load(File.expand_path('../ruby_llm.gemspec', __dir__)) }
def runtime_dependency(name)
gemspec.dependencies.find { |dependency| dependency.type == :runtime && dependency.name == name }
end
it 'keeps faraday compatible with Ruby < 4.0' do
expected_requirement = ENV['FARADAY_VERSION'] ? "= #{ENV['FARADAY_VERSION']}" : '>= 1.10.0'
expect(runtime_dependency('faraday').requirement.to_s).to eq(expected_requirement)
end
it 'keeps faraday-retry compatible with Faraday v1 and v2' do
expect(runtime_dependency('faraday-retry').requirement.to_s).to eq('>= 1')
end
end
# rubocop:enable RSpec/DescribeClass