fake_smith 0.0.12 → 0.1.0

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: c1707478328fdf96d7cc61df80fa9558772563ba
4
- data.tar.gz: 5dea724171f22c3afc288cea5970adec2386da45
3
+ metadata.gz: 32024088bc7448d01170ae23c9053673c4a804e4
4
+ data.tar.gz: 2c2929e478ac089f91ac7707f6b1faf407a20150
5
5
  SHA512:
6
- metadata.gz: bcd0ff60b714650d2f62fe11a6db3bee4554350c7403d4c3188307edb9f5eeba3ade73c1f086b3d3b1c302deac2b593e15d60f558f1571f26a560bb0e3efb2eb
7
- data.tar.gz: bae1ab4b24230a075e52202ed19414f9d2b95ae1eae46fc683f69b16046cee8c2fd449ea72b07194e568ee3daea7198a3b1b94e142cfe401310c0725c4b6a013
6
+ metadata.gz: 2dd36aebfebb8576deb1732a12de20c84485d08eabec589a436d27ec7c39c3b03f99883c8aa6616c6a6429dd8ba3cee2724c1ffe8ec1ff6d98823ff98b022db5
7
+ data.tar.gz: bf00541b8f77fd5e38c95fe56dd6cb11d6126445c4e8e2a6fef8436880b19c266333dcd73021cc67640d3c334d5ed3426213256d938cf271e4ab1a73291d5d0d
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # FakeSmith
2
2
 
3
- FakeSmith is here to help you unit test your Smith Agents.
3
+ FakeSmith is here to help you unit test your [Smith](https://github.com/filterfish/smith2) Agents.
4
4
 
5
5
  Have you ever wanted to test your agents without having to worry about all the overhead of running the agency and sending messages and waiting asynchronously for the magic to happen? Well want no longer and do now!
6
6
 
@@ -1,3 +1,3 @@
1
1
  class FakeSmith
2
- VERSION = "0.0.12"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/fake_smith.rb CHANGED
@@ -23,12 +23,17 @@ class FakeSmith
23
23
  def self.clear_all
24
24
  clear_subscriptions
25
25
  clear_messages
26
+ clear_logger
26
27
  end
27
28
 
28
29
  def self.subscribed_queues
29
30
  subscriptions.keys
30
31
  end
31
32
 
33
+ def self.logger
34
+ @logger ||= FakeSmith::Logger.new
35
+ end
36
+
32
37
  private
33
38
 
34
39
  def self.messages
@@ -47,7 +52,13 @@ class FakeSmith
47
52
  @subscriptions = {}
48
53
  end
49
54
 
55
+ def self.clear_logger
56
+ @logger = nil
57
+ end
58
+
50
59
  class Logger
60
+ attr_reader :logs
61
+
51
62
  def initialize
52
63
  @logs = {}
53
64
  end
@@ -152,7 +163,7 @@ module Smith
152
163
  end
153
164
 
154
165
  def logger
155
- @b06b2bd ||= FakeSmith::Logger.new
166
+ FakeSmith.logger
156
167
  end
157
168
 
158
169
  def get_test_logger
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_smith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Griffith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-23 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler