wires-test 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wires/test.rb +8 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2b683dcceb6074d7fe4601260a3ff09a38b8fdb
4
- data.tar.gz: 2fb8f68ebd2efe4769793bdcfbca60e39b0e906c
3
+ metadata.gz: b19ee2c3fdcbfd811e3f05cc2816446d3a7b1191
4
+ data.tar.gz: b0e8297e79d2ad56763979b51fa0921a044ab16b
5
5
  SHA512:
6
- metadata.gz: 8487929d329581fabd585df04d89643d4c888a861528dde30b7668f85d8089dbff700be13405f3278b1fd837763cc7a2f3fc71b5a872f5ed2025b2416c6bc206
7
- data.tar.gz: 7ef64f0e9f3f9ea5b479d86d83c44ae62f490980fd463d08278e92da57a821ce6da0a388fb24b3770df2a0e50a25695eb67c55c031942f25c25aa09e3675b581
6
+ metadata.gz: 9e77daf69bb48615b8d5a1b611a4ccb4c5ca4d09dbd728e64f237d03981fd5600ca0584ab25590803691764e0c4cdac8a4cff64054745128eb812ce7e97ceb61
7
+ data.tar.gz: 53ee036fad0eae79d1be14a25ee418a324a36978ad003e111f46c2bce6fbce197cc3b5616c506e5f052b9d0338ce2b60d87a94c1d7a1a630037e45ac5500a203
data/lib/wires/test.rb CHANGED
@@ -117,14 +117,17 @@ shared_context "with AFFIX wires stimulus" do |event, **kwargs|
117
117
  end
118
118
 
119
119
 
120
- ::RSpec::Matchers.define :have_AFFIX_fired do |event, channel=:__no_channel_was_specified__, fulfilling:nil|
120
+ ::RSpec::Matchers.define :have_AFFIX_fired do
121
121
  match do |_|
122
- AFFIX_fired? event, channel, &fulfilling
122
+ *args, fulfilling = process_expected(*expected)
123
+ AFFIX_fired? *args, &fulfilling
123
124
  end
124
125
 
125
126
  description do
127
+ event, channel, _ = process_expected(*expected)
128
+
126
129
  str = "have fired #{event.inspect}"
127
- str += " on #{channel.inspect}" unless channel==:__no_channel_was_specified__
130
+ str += " on #{channel.inspect}" if channel
128
131
  str
129
132
  end
130
133
 
@@ -139,6 +142,8 @@ end
139
142
  def actual_events
140
143
  matcher_execution_context.instance_variable_get :@AFFIX_wires_events
141
144
  end
145
+
146
+ def process_expected(*args, fulfilling:nil); [*args, fulfilling] end
142
147
  end
143
148
 
144
149
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wires-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe McIlvain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-10 00:00:00.000000000 Z
11
+ date: 2013-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wires
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.1.5
97
+ rubygems_version: 2.1.11
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: wires-test