Skip to content

Commit e8785fe

Browse files
committed
add rails cache to tests envirenement
1 parent 64d44cb commit e8785fe

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ gemspec
55
gem 'rake'
66
gem 'pry'
77
gem 'test-unit'
8-
gem 'webmock', require: false
8+
gem 'webmock', require: false
9+
# Add these lines to your Gemfile
10+
gem 'rails'
11+
gem 'activesupport'

Gemfile.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ PATH
1717
GEM
1818
remote: https://rubygems.org/
1919
specs:
20+
actionmailer (0.6.1)
21+
actionpack (>= 0.9.5)
22+
actionpack (1.4.0)
23+
activemodel (7.0.8.6)
24+
activesupport (= 7.0.8.6)
25+
activerecord (7.0.8.6)
26+
activemodel (= 7.0.8.6)
27+
activesupport (= 7.0.8.6)
2028
activesupport (7.0.8.6)
2129
concurrent-ruby (~> 1.0, >= 1.0.2)
2230
i18n (>= 1.6, < 2)
@@ -59,6 +67,11 @@ GEM
5967
method_source (~> 1.0)
6068
public_suffix (5.1.1)
6169
rack (3.1.8)
70+
rails (0.9.5)
71+
actionmailer (>= 0.6.1)
72+
actionpack (>= 1.4.0)
73+
activerecord (>= 1.6.0)
74+
rake (>= 0.4.15)
6275
rake (13.2.1)
6376
request_store (1.7.0)
6477
rack (>= 1.4)
@@ -81,8 +94,10 @@ PLATFORMS
8194
x86_64-linux
8295

8396
DEPENDENCIES
97+
activesupport
8498
ontologies_api_client!
8599
pry
100+
rails
86101
rake
87102
test-unit
88103
webmock

test/test_case.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
require 'test-unit'
2+
require 'active_support'
3+
require 'active_support/cache'
24
require_relative '../lib/ontologies_api_client'
35
require_relative '../config/config'
46
require 'webmock'
57

68
WebMock.allow_net_connect!
9+
10+
module Rails
11+
def self.cache
12+
@cache ||= ActiveSupport::Cache::MemoryStore.new
13+
end
14+
end
15+
716
module LinkedData
817
module Client
918
class TestCase < Test::Unit::TestCase

0 commit comments

Comments
 (0)