Skip to content

Commit d9ccabc

Browse files
committed
Fixing test runner configs
1 parent 9045bd5 commit d9ccabc

3 files changed

Lines changed: 45 additions & 25 deletions

File tree

Rakefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
require "bundler/setup"
22
require "bundler/gem_tasks"
3+
require "rake/testtask"
34

4-
desc "Run tests"
5-
task :test do
6-
$: << File.expand_path("test", __dir__)
7-
require "rails/plugin/test"
5+
Rake::TestTask.new(:test) do |t|
6+
t.libs << "test"
7+
t.pattern = "test/**/*_test.rb"
8+
t.verbose = true
89
end
10+
11+
task default: :test

bin/test

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
24
unless ENV["CI"]
35
require "dotenv"
46
Dotenv.load(".env.test")
57
end
68

7-
$: << File.expand_path("../test", __dir__)
9+
ENV["RAILS_ENV"] = "test"
810

911
require "bundler/setup"
10-
require "rails/plugin/test"
12+
13+
$LOAD_PATH.unshift File.expand_path("../test", __dir__)
14+
require "test_helper"
15+
16+
# Collect test files
17+
test_files = if ARGV.empty?
18+
Dir[File.expand_path("../test/**/*_test.rb", __dir__)]
19+
else
20+
ARGV.map do |arg|
21+
if File.exist?(arg)
22+
File.expand_path(arg)
23+
elsif File.exist?(File.expand_path("../#{arg}", __dir__))
24+
File.expand_path("../#{arg}", __dir__)
25+
else
26+
arg
27+
end
28+
end
29+
end
30+
31+
# Load test files
32+
test_files.each { |file| require file if File.exist?(file) }

test/dummy/Gemfile.lock

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../../..
33
specs:
4-
activeagent (0.6.3)
4+
activeagent (1.0.1)
55
actionpack (>= 7.2, <= 9.0)
66
actionview (>= 7.2, <= 9.0)
77
activejob (>= 7.2, <= 9.0)
@@ -102,6 +102,7 @@ GEM
102102
rack-test (>= 0.6.3)
103103
regexp_parser (>= 1.5, < 3.0)
104104
xpath (~> 3.2)
105+
cgi (0.5.1)
105106
concurrent-ruby (1.3.5)
106107
connection_pool (2.5.4)
107108
crass (1.0.6)
@@ -112,15 +113,6 @@ GEM
112113
drb (2.2.3)
113114
erb (5.1.1)
114115
erubi (1.13.1)
115-
event_stream_parser (1.0.0)
116-
faraday (2.14.0)
117-
faraday-net_http (>= 2.0, < 3.5)
118-
json
119-
logger
120-
faraday-multipart (1.1.1)
121-
multipart-post (~> 2.0)
122-
faraday-net_http (3.4.1)
123-
net-http (>= 0.5.0)
124116
globalid (1.3.0)
125117
activesupport (>= 6.1)
126118
i18n (1.14.7)
@@ -146,11 +138,9 @@ GEM
146138
marcel (1.1.0)
147139
matrix (0.4.3)
148140
mini_mime (1.1.5)
141+
mini_portile2 (2.8.9)
149142
minitest (5.26.0)
150143
msgpack (1.8.0)
151-
multipart-post (2.4.1)
152-
net-http (0.6.0)
153-
uri
154144
net-imap (0.5.12)
155145
date
156146
net-protocol
@@ -161,6 +151,9 @@ GEM
161151
net-smtp (0.5.1)
162152
net-protocol
163153
nio4r (2.7.4)
154+
nokogiri (1.18.10)
155+
mini_portile2 (~> 2.8.2)
156+
racc (~> 1.4)
164157
nokogiri (1.18.10-aarch64-linux-gnu)
165158
racc (~> 1.4)
166159
nokogiri (1.18.10-aarch64-linux-musl)
@@ -177,6 +170,10 @@ GEM
177170
racc (~> 1.4)
178171
nokogiri (1.18.10-x86_64-linux-musl)
179172
racc (~> 1.4)
173+
openai (0.43.0)
174+
base64
175+
cgi
176+
connection_pool
180177
pp (0.6.3)
181178
prettyprint
182179
prettyprint (0.2.0)
@@ -234,10 +231,6 @@ GEM
234231
reline (0.6.2)
235232
io-console (~> 0.5)
236233
rexml (3.4.4)
237-
ruby-openai (8.3.0)
238-
event_stream_parser (>= 0.3.0, < 2.0.0)
239-
faraday (>= 1)
240-
faraday-multipart (>= 1)
241234
rubyzip (3.2.0)
242235
securerandom (0.4.1)
243236
selenium-webdriver (4.36.0)
@@ -248,6 +241,8 @@ GEM
248241
rexml (~> 3.2, >= 3.2.5)
249242
rubyzip (>= 1.2.2, < 4.0)
250243
websocket (~> 1.0)
244+
sqlite3 (2.7.4)
245+
mini_portile2 (~> 2.8.0)
251246
sqlite3 (2.7.4-aarch64-linux-gnu)
252247
sqlite3 (2.7.4-aarch64-linux-musl)
253248
sqlite3 (2.7.4-arm-linux-gnu)
@@ -293,14 +288,14 @@ PLATFORMS
293288

294289
DEPENDENCIES
295290
activeagent!
296-
anthropic (~> 1.1)
291+
anthropic (~> 1.12)
297292
bootsnap
298293
capybara
299294
debug
300295
jbuilder
296+
openai (~> 0.34)
301297
puma (>= 5.0)
302298
rails (~> 8.0.2.1)
303-
ruby-openai (~> 8.3)
304299
selenium-webdriver
305300
sqlite3 (>= 2.1)
306301
tzinfo-data

0 commit comments

Comments
 (0)