active_job_channel 0.0.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -4,6 +4,8 @@ ENV['RAILS_ENV'] ||= 'test'
4
4
  require File.expand_path('../dummy/config/environment.rb', __FILE__)
5
5
  require 'rspec/rails'
6
6
 
7
+ ActiveJob::Base.queue_adapter = :test
8
+
7
9
  RSpec.configure do |config|
8
10
  config.mock_with :rspec
9
11
  config.use_transactional_fixtures = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_job_channel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Cavanaugh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-14 00:00:00.000000000 Z
11
+ date: 2018-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 5.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler-audit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: byebug
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -95,6 +109,7 @@ files:
95
109
  - lib/active_job_channel/channel.rb
96
110
  - lib/active_job_channel/engine.rb
97
111
  - lib/active_job_channel/version.rb
112
+ - spec/active_job_channel/broadcaster_spec.rb
98
113
  - spec/dummy/Rakefile
99
114
  - spec/dummy/app/assets/config/manifest.js
100
115
  - spec/dummy/app/assets/javascripts/application.js
@@ -744,7 +759,6 @@ files:
744
759
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/zm/zmcc4LVEiv2g9UHT7hgSxpAHywK_Kn20ARJ2O0Lg3Ss.cache
745
760
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/zm/zmztDrq706J1aOrQD4n1o0B-opfEsF8WSCcPxX8Ltao.cache
746
761
  - spec/dummy/tmp/restart.txt
747
- - spec/jobs/application_job_spec.rb
748
762
  - spec/spec_helper.rb
749
763
  homepage:
750
764
  licenses:
@@ -758,7 +772,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
758
772
  requirements:
759
773
  - - ">="
760
774
  - !ruby/object:Gem::Version
761
- version: '0'
775
+ version: 2.2.2
762
776
  required_rubygems_version: !ruby/object:Gem::Requirement
763
777
  requirements:
764
778
  - - ">="
@@ -1421,4 +1435,4 @@ test_files:
1421
1435
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/qq/qq7obCPrSbhbXW3Waztx-00B0Ey9RQq9kY_Sf-7YN5c.cache
1422
1436
  - spec/dummy/tmp/cache/assets/sprockets/v3.0/wh/wh9DQyFSOSvQgS-z1GMd30hOcGxM5OV5Qr1CkRVej0E.cache
1423
1437
  - spec/dummy/tmp/restart.txt
1424
- - spec/jobs/application_job_spec.rb
1438
+ - spec/active_job_channel/broadcaster_spec.rb
@@ -1,27 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe ApplicationJob do
4
- it 'broadcasts success' do
5
- expect(ActionCable.server).
6
- to receive(:broadcast).
7
- with('active_job_channel', status: 'success', job_name: 'ApplicationJob')
8
- described_class.perform_now
9
- end
10
-
11
- it 'broadcasts failure' do
12
- allow_any_instance_of(described_class).
13
- to receive(:fake).
14
- and_raise(::StandardError)
15
- expect(ActionCable.server).
16
- to receive(:broadcast).
17
- with('active_job_channel', status: 'failure', job_name: 'ApplicationJob')
18
- expect { described_class.perform_now }.to raise_error(::StandardError)
19
- end
20
-
21
- it 'broadcasts the job name' do
22
- expect(ActionCable.server).
23
- to receive(:broadcast).
24
- with('active_job_channel', status: 'success', job_name: 'ApplicationJob')
25
- described_class.perform_now
26
- end
27
- end