queue_classic_matchers 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/queue_classic_matchers/version.rb +1 -1
- data/lib/queue_classic_matchers.rb +25 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20a6402f94f91ede25d670e817654e316d3cacac
|
4
|
+
data.tar.gz: c31e0e575128fb4bfce4cb492f9b03914af1216e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54831a042cecf19014b6b85fd7788f7aa113c6fc69504aeae9beb01c2ccade2efb1ff80ddb03bf5de5c3ed637e2ec55678a60c6df4d5a5b294c3cc00e7ce7457
|
7
|
+
data.tar.gz: 739cbec8a5861965ecb3c321de2b43a4c43759b5c7272a575e86a21c55183df5861eb1c6a3d16c04aba8108131169b901342eaec43473b6f364018567ff4eb98
|
@@ -18,6 +18,31 @@ module QueueClassicMatchers
|
|
18
18
|
QC.default_conn_adapter.execute "DELETE FROM queue_classic_later_jobs"
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
if defined?(QueueClassicPlus)
|
23
|
+
module QueueClassicPlus
|
24
|
+
module Job
|
25
|
+
def self.included(receiver)
|
26
|
+
receiver.class_eval do
|
27
|
+
shared_examples_for "a queueable class" do
|
28
|
+
subject { described_class }
|
29
|
+
its(:queue) { should be_a(::QC::Queue) }
|
30
|
+
it { should respond_to(:do) }
|
31
|
+
it { should respond_to(:perform) }
|
32
|
+
|
33
|
+
it "should be a valid queue name" do
|
34
|
+
subject.queue.name.should be_present
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
RSpec.configure do |c|
|
43
|
+
c.include QueueClassicMatchers::QueueClassicPlus::Job, type: :job
|
44
|
+
end
|
45
|
+
end
|
21
46
|
end
|
22
47
|
|
23
48
|
RSpec::Matchers.define :have_queued do |*expected|
|
@@ -127,16 +152,3 @@ RSpec::Matchers.define :have_scheduled do |*expected_args|
|
|
127
152
|
"have scheduled arguments"
|
128
153
|
end
|
129
154
|
end
|
130
|
-
|
131
|
-
if defined?(QueueClassicPlus)
|
132
|
-
RSpec.shared_examples_for "a queueable class" do
|
133
|
-
subject { described_class }
|
134
|
-
its(:queue) { should be_a(::QC::Queue) }
|
135
|
-
it { should respond_to(:do) }
|
136
|
-
it { should respond_to(:perform) }
|
137
|
-
|
138
|
-
it "should be a valid queue name" do
|
139
|
-
subject.queue.name.should be_present
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|