employer-mongoid 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,10 @@ module Employer
16
16
  end
17
17
  end
18
18
 
19
+ def clear
20
+ Employer::Mongoid::Job.destroy_all
21
+ end
22
+
19
23
  def complete(job)
20
24
  Employer::Mongoid::Job.find(job.id).destroy
21
25
  end
@@ -1,5 +1,5 @@
1
1
  module Employer
2
2
  module Mongoid
3
- VERSION = "0.1"
3
+ VERSION = "0.2"
4
4
  end
5
5
  end
@@ -30,6 +30,13 @@ describe Employer::Mongoid::Pipeline do
30
30
  end
31
31
  end
32
32
 
33
+ describe "clear" do
34
+ it "deletes all jobs" do
35
+ Employer::Mongoid::Job.should_receive(:destroy_all)
36
+ pipeline.clear
37
+ end
38
+ end
39
+
33
40
  describe "#complete" do
34
41
  it "deletes the job from the collection" do
35
42
  job_document = double("Job document")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: employer-mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: