bubot 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74f041f6e5452977767a4b2b312c88a9ccd1735b
4
- data.tar.gz: de3f6d5b47ffae106723727bfd591f39b79bdf18
3
+ metadata.gz: 5164f040c4ac3f870f748ebd333ffc0a755b4e5f
4
+ data.tar.gz: d31db432a0ae70aedb45aeb98ec43b1f5a699581
5
5
  SHA512:
6
- metadata.gz: 70539412f14584c7f9cdf7df404fa39204fc4eea735c995f4c94ac4d47caee338c8dfaa80eef6097e29868770a90e45026700be14f0279e03150219201379a4c
7
- data.tar.gz: 1e6752083102f66d367290819c2142f171646fe14e301f3d2651d824d3248c1ee71525394590ae739e07c50627ec418b72974af043b43e93fbb613f48b072925
6
+ metadata.gz: c5bf37ee1f8e8f37b1bd236e37dc86066c3ac341b4e3c78243abcc0e48d99a8d7a9b925214e637dacbb4be373bd65a9314171e55991ff5ccae4c64fc830860d0
7
+ data.tar.gz: 23dc04269ed4d55b84d93583c49cd98cd19ac55fbec4ee1ad55752fd4de7e7596704f05b12cbda67a88cc388861a7b7dafb05782dbef54923582e2d71052381e
@@ -10,7 +10,7 @@ module Bubot
10
10
 
11
11
  method_return_value = send("#{method_name}_without_feature".to_sym, *args, &block)
12
12
 
13
- if (total_time = Time.now - start_time) > defaults[:timeout]
13
+ if (total_time = Time.now - start_time) >= defaults[:timeout]
14
14
  if options[:with]
15
15
  options[:with].call(self, total_time, method_return_value)
16
16
  else
@@ -1,3 +1,3 @@
1
1
  module Bubot
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -86,7 +86,7 @@ describe Bubot do
86
86
 
87
87
  context "sending messages to strategy" do
88
88
  it "passes its instance to the strategy" do
89
- class RecievesSelfStrategy
89
+ class ReceivesSelfStrategy
90
90
  def self.execute(instance)
91
91
  # do stuff
92
92
  end
@@ -95,19 +95,19 @@ describe Bubot do
95
95
  class PassesSelf
96
96
  extend Bubot
97
97
  watch(:pass_self, timeout: 0.001) do |instance|
98
- RecievesSelfStrategy.execute(instance)
98
+ ReceivesSelfStrategy.execute(instance)
99
99
  end
100
100
  def pass_self; sleep 0.002; end
101
101
  end
102
102
 
103
103
  bubot_observed = PassesSelf.new
104
- RecievesSelfStrategy.should_receive(:execute).with(bubot_observed).once
104
+ ReceivesSelfStrategy.should_receive(:execute).with(bubot_observed).once
105
105
 
106
106
  bubot_observed.pass_self
107
107
  end
108
108
 
109
109
  it "passes the time it took to the strategy" do
110
- class RecievesTimeStrategy
110
+ class ReceivesTimeStrategy
111
111
  def self.execute(instance, time)
112
112
  # do stuff
113
113
  end
@@ -116,22 +116,22 @@ describe Bubot do
116
116
  class PassesTime
117
117
  extend Bubot
118
118
  watch(:pass_time, timeout: 0.001) do |instance, time|
119
- RecievesTimeStrategy.execute(instance, time)
119
+ ReceivesTimeStrategy.execute(instance, time)
120
120
  end
121
121
  def pass_time; sleep 0.002; end
122
122
  end
123
123
 
124
124
  bubot_observed = PassesTime.new
125
- RecievesTimeStrategy.should_receive(:execute) do |instance, time|
126
- expect(time).to be > 0.002
125
+ ReceivesTimeStrategy.should_receive(:execute) do |instance, time|
126
+ expect(time).to be > 0.001
127
127
  expect(instance).to be(bubot_observed)
128
128
  end
129
129
 
130
130
  bubot_observed.pass_time
131
131
  end
132
132
 
133
- it "passes the returned value form the watched method" do
134
- class RecievesReturnValueStrategy
133
+ it "passes the returned value from the watched method" do
134
+ class ReceivesReturnValueStrategy
135
135
  def self.execute(instance, time, original_value)
136
136
  # do stuff
137
137
  end
@@ -140,7 +140,7 @@ describe Bubot do
140
140
  class PassesReturnValue
141
141
  extend Bubot
142
142
  watch(:pass_return_value, timeout: 0.001) do |instance, time, return_value|
143
- RecievesReturnValueStrategy.execute(instance, time, return_value)
143
+ ReceivesReturnValueStrategy.execute(instance, time, return_value)
144
144
  end
145
145
  def pass_return_value
146
146
  sleep 0.002
@@ -149,8 +149,8 @@ describe Bubot do
149
149
  end
150
150
 
151
151
  bubot_observed = PassesReturnValue.new
152
- RecievesReturnValueStrategy.should_receive(:execute) do |instance, time, return_value|
153
- expect(time).to be > 0.002
152
+ ReceivesReturnValueStrategy.should_receive(:execute) do |instance, time, return_value|
153
+ expect(time).to be > 0.001
154
154
  expect(instance).to be(bubot_observed)
155
155
  expect(return_value).to eq("return_value")
156
156
  end
@@ -181,7 +181,7 @@ describe Bubot do
181
181
  original_class = UsingWith.new
182
182
  expect(RespondingStrategy).to receive(:call) do |instance, time, value|
183
183
  expect(instance).to be(original_class)
184
- expect(time).to be > 0
184
+ expect(time).to be >= 0
185
185
  expect(value).to eq "original value"
186
186
  end
187
187
  original_class.original
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bubot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Cooper
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-23 00:00:00.000000000 Z
12
+ date: 2013-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler