test_bench-fixture 1.2.2.0 → 1.2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_bench/fixture/output/capture.rb +20 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4555b782d4916254da1a5cad74ae69b8bc10072f45fa89f0527ddba0a581cb2d
|
4
|
+
data.tar.gz: 608f1985785f4664727093f86958ba3dff3ed0ead19234a473339f7dced32b78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46b499e82c1fe3a8a4c5648c013a71d96fe4273734771f5d29ec092969faf051a618c221389f61ceed0500274d4490113d96351106c09ec5916378a07cb9cba7
|
7
|
+
data.tar.gz: 26db4c70d4fa210b84ee592e1b8849a9b2622f7a56096844dfd5c85e77c035607cd481bdce1ac0072aaa59652bd4312d7ef3cff83e52ac97db35f20f13e943f0
|
@@ -99,13 +99,31 @@ module TestBench
|
|
99
99
|
def new_record(signal, data)
|
100
100
|
context = current_context.dup
|
101
101
|
|
102
|
-
record = Record.
|
102
|
+
record = Record.build(signal, data, context)
|
103
103
|
end
|
104
104
|
|
105
|
-
Record
|
105
|
+
class Record
|
106
|
+
attr_accessor :signal
|
107
|
+
attr_accessor :data
|
108
|
+
attr_accessor :context
|
109
|
+
|
110
|
+
def self.build(signal, data, context=nil)
|
111
|
+
instance = new
|
112
|
+
instance.signal = signal
|
113
|
+
instance.data = data
|
114
|
+
instance.context = context
|
115
|
+
instance
|
116
|
+
end
|
117
|
+
|
106
118
|
def forward(receiver)
|
107
119
|
receiver.public_send(signal, *data)
|
108
120
|
end
|
121
|
+
|
122
|
+
def ==(record)
|
123
|
+
self.signal == record.signal &&
|
124
|
+
self.data == record.data &&
|
125
|
+
self.context == record.context
|
126
|
+
end
|
109
127
|
end
|
110
128
|
end
|
111
129
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_bench-fixture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.2.
|
4
|
+
version: 1.2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test_bench-bootstrap
|