omnikiq 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4121b6ebf9f51bd0e9020663ac39cff9cfe1864
4
- data.tar.gz: 3a989e94a75d2dc74a511500536569fc91fb4093
3
+ metadata.gz: b1a85bac23ae74c3e63e7d5b86a115c47c6eec20
4
+ data.tar.gz: e17f6a9d4ef7182de40dd5da2d85a51e14819664
5
5
  SHA512:
6
- metadata.gz: c52418f0c0e1de3d7d46c4baa08838a7cc27a4551798cb28ac8abe7b4234d46bd8a9eed80f0a309cfcc3e108caccafc9947d22b00e47128e02132f8a6e11e920
7
- data.tar.gz: eebf1bab2bcfd1716b2e12fdfdea88242e8ba33a0de175775f032bfc6a0e505a474a9042d9b2c4549d6f523dee8b9a3484a6e51f17c7e56acb9043e6ede375b4
6
+ metadata.gz: 9ba97055b7db8168b16b3ffbd66a7a457ff16704f34541a0bb4cd856393666c07ee5fd53da25291651f896ac29c5eb57597f1a2535d29458da00488c74cb375f
7
+ data.tar.gz: cbe0a0fd8190a7020c5d3c2e7b08b019d9fd75e8f0d4e042c62eb29d7286783d20aa17740c92338a5231119eda98e81e2ab46b3bb6b0ec098dbb4c8f3c7fa7ee
data/lib/omnikiq.rb CHANGED
@@ -35,6 +35,11 @@ module OmniKiq
35
35
  size: 10
36
36
  }
37
37
  end
38
+
39
+ if OmniKiq.configuration.test_mode
40
+ require 'sidekiq/testing'
41
+ Sidekiq::Testing.fake!
42
+ end
38
43
  end
39
44
 
40
45
  # default config for the client
@@ -7,5 +7,6 @@ describe OmniKiq::Configuration do
7
7
  its(:mixpanel_api_key) { is_expected.to eq '' }
8
8
  its(:redis_url) { is_expected.to eq 'redis://localhost:6379' }
9
9
  its(:redis_namespace) { 'default' }
10
+ its(:test_mode) { false }
10
11
  end
11
12
  end
data/spec/omnikiq_spec.rb CHANGED
@@ -19,5 +19,17 @@ describe OmniKiq do
19
19
  c.mixpanel_api_key = 'mixpanel id'
20
20
  end
21
21
  end
22
+
23
+ context 'when test mode is set to true' do
24
+ before do
25
+ OmniKiq.configure do |c|
26
+ c.test_mode = true
27
+ end
28
+ end
29
+
30
+ it 'will set fake to Sidekiq' do
31
+ expect(Sidekiq::Testing).to be_fake
32
+ end
33
+ end
22
34
  end
23
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnikiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Nistor