bumbleworks 0.0.85 → 0.0.86

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: 47d3d5c9dcf82c6040641bd3fc2ebad001223025
4
- data.tar.gz: 581a2b5a3a244221f42dcb06c87c24fcb1323468
3
+ metadata.gz: 803b0ca4b01ae7606eb47ce6c2037656f7d92564
4
+ data.tar.gz: e5fa78cad9e93b529310cfd7df343cca83026061
5
5
  SHA512:
6
- metadata.gz: df6d711ecdc07505a85c028b40f329c0ec3a279a87b2a897e21e9ed64751c5526cd625333e1020f534c941d2b28297f6a93e857d10f6f4d6c7b4a571f5fccd2c
7
- data.tar.gz: 9d1448f9ae21f784d24aca0b710c541905ac5db8d97326197558c365bd591bf7e21d4d4b098577e2b241da172cc9bb001d1be95e6d7762519f077386ee60e0ac
6
+ metadata.gz: 4f5e0d79e475abb6cdde5a7e77f494804f81623a98dd9b09a1f5275b0a4ebe7e0da3e19d967117a595b8716577ea607951f4d7d5f31cee8978368fd9ab3f8d94
7
+ data.tar.gz: 4c7d72432405cdf5c44da24b09888436865a1a2ef7db212501cff7099b0e0425f767ab0e36d3b0034ef4b0c75544a116e73c69acd107b90bf1805b52337a9744
@@ -16,6 +16,7 @@ module Bumbleworks
16
16
  end
17
17
 
18
18
  def ==(other)
19
+ return false unless other.is_a?(self.class)
19
20
  @fei == other.fei
20
21
  end
21
22
 
@@ -47,14 +47,14 @@ module Bumbleworks
47
47
  alias_method :wfid, :id
48
48
 
49
49
  def <=>(other)
50
- unless other.respond_to?(:wfid)
50
+ unless other.is_a?(self.class)
51
51
  raise ArgumentError, "comparison of Bumbleworks::Process with #{other.class} failed"
52
52
  end
53
53
  wfid <=> other.wfid
54
54
  end
55
55
 
56
56
  def ==(other)
57
- return false unless other.respond_to?(:wfid)
57
+ return false unless other.is_a?(self.class)
58
58
  wfid == other.wfid
59
59
  end
60
60
 
@@ -20,6 +20,7 @@ module Bumbleworks
20
20
  end
21
21
 
22
22
  def ==(other)
23
+ return false unless other.is_a?(self.class)
23
24
  @id == other.id
24
25
  end
25
26
 
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.85"
2
+ VERSION = "0.0.86"
3
3
  end
@@ -7,6 +7,7 @@ module Bumbleworks
7
7
  end
8
8
 
9
9
  def ==(other)
10
+ return false unless other.is_a?(self.class)
10
11
  raw_workitem == other.raw_workitem
11
12
  end
12
13
 
@@ -23,6 +23,12 @@ describe Bumbleworks::Expression do
23
23
  exp2 = described_class.new(double('FlowExpression', :fei => double(:expid => '4')))
24
24
  expect(exp1).not_to eq(exp2)
25
25
  end
26
+
27
+ it 'returns false if other object has is not an expression' do
28
+ exp1 = described_class.new(fexp)
29
+ exp2 = double('not an expression')
30
+ expect(exp1).not_to eq(exp2)
31
+ end
26
32
  end
27
33
 
28
34
  describe '#expid' do
@@ -357,10 +357,9 @@ describe Bumbleworks::Process do
357
357
  expect(bp1).to eq(bp2)
358
358
  end
359
359
 
360
- it 'returns false if other object does not respond to wfid' do
360
+ it 'returns false if other object is not a process' do
361
361
  bp1 = described_class.new('in_da_sky')
362
362
  bp2 = double('not a process')
363
- allow(bp2).to receive(:respond_to?).with(:wfid).and_return(false)
364
363
  expect(bp1).not_to eq(bp2)
365
364
  end
366
365
  end
@@ -375,10 +374,9 @@ describe Bumbleworks::Process do
375
374
  expect(bp3 <=> bp1).to eq 0
376
375
  end
377
376
 
378
- it 'raises ArgumentError if other object does not respond to wfid' do
377
+ it 'raises ArgumentError if other object is not a process' do
379
378
  bp1 = described_class.new('in_da_sky')
380
379
  bp2 = double('not a process')
381
- allow(bp2).to receive(:respond_to?).with(:wfid).and_return(false)
382
380
  expect { bp1 <=> bp2 }.to raise_error(ArgumentError, "comparison of Bumbleworks::Process with RSpec::Mocks::Double failed")
383
381
  end
384
382
  end
@@ -45,6 +45,12 @@ describe Bumbleworks::Schedule do
45
45
  schedule2 = described_class.new({ '_id' => 'snooglebunk', 'yeah' => 'whatevs' })
46
46
  expect(schedule1).not_to eq(schedule2)
47
47
  end
48
+
49
+ it 'returns false if other object is not a schedule' do
50
+ schedule1 = described_class.new({ '_id' => 'snaggletooth', 'who' => 'cares' })
51
+ schedule2 = double('not a schedule')
52
+ expect(schedule1).not_to eq(schedule2)
53
+ end
48
54
  end
49
55
 
50
56
  describe '#wfid' do
@@ -10,6 +10,12 @@ describe Bumbleworks::Workitem do
10
10
  bw2 = described_class.new('in_da_sky')
11
11
  expect(bw1).to eq(bw2)
12
12
  end
13
+
14
+ it 'returns false if other object is not a workitem' do
15
+ bw1 = described_class.new('in_da_sky')
16
+ bw2 = double('not a workitem')
17
+ expect(bw1).not_to eq(bw2)
18
+ end
13
19
  end
14
20
 
15
21
  describe '#has_entity_fields?' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bumbleworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.85
4
+ version: 0.0.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maher Hawash