Skip to content

Commit e542b87

Browse files
author
i2bskn
committed
redis connect test
1 parent c3af58a commit e542b87

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,6 @@ jobs:
6464
bundle config set path .bundle
6565
bundle install -j 4
6666
- name: Run tests
67+
env:
68+
REDIS_HOST: redis
6769
run: bundle exec rspec

spec/redis_eval/script_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RSpec.describe RedisEval::Script do
2+
it { Redis.current.ping }
3+
end

spec/spec_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# Uncomment when debugging
55
# require "pry"
66

7+
Redis.current = Redis.new(host: ENV["REDIS_HOST"]) if ENV.has_key?("REDIS_HOST")
8+
9+
Dir.glob("#{__dir__}/support/**/*.rb").sort.each { |f| require f }
10+
711
RSpec.configure do |config|
812
# Enable flags like --only-failures and --next-failure
913
config.example_status_persistence_file_path = ".rspec_status"

0 commit comments

Comments
 (0)