sequent 0.1.6 → 0.1.7

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: 0e8e35986af2a9dcdb19a2d66b291606e852b96c
4
- data.tar.gz: a049cc85e36f391e22fd35ae3d45061f81eb7562
3
+ metadata.gz: 6cfc6364eb9b237df9e8869ef5d602e7e2509954
4
+ data.tar.gz: 4a280a35f92badb08aa8dbe2919d6aa329c6a23b
5
5
  SHA512:
6
- metadata.gz: 319d6c1cb5397766edb05bb6239a083d51722490a85f7120c68a4973cda6d30d9a92a2efecaec0c0a0df42d864e80d4142ecc23ceea6255c344076f9703e45f1
7
- data.tar.gz: e7768f63f1369006ed1a61397ce5d5195e35142a497113ffd6e03c34edffe56f49d20d3271b680b56b18752f3c32f91b8c72f4572fe01cafb4bf3fd16dc6e716
6
+ metadata.gz: 6b56f436d037c8a9ba3718c512d413a2fe7e03822618c1a48c386cf45167490ee987223d596c432ce8bdfb367a76f044317ffb5081e5c4ec6056af065e4e1a09
7
+ data.tar.gz: 9bd699e91835b989e6f417bd9976826576742ef98e5c84e815ae9f68f6a9447993f28ed622426599b9fb242a5321e46f18ae4f1066d1454f1eb2e1463f01a9f7
@@ -33,11 +33,6 @@ module Sequent
33
33
  # then_events InvoicePaidEvent(args)
34
34
  # end
35
35
  #
36
- # it "rejects coupon when does not exist" do
37
- # given_events CartCreatedEvent.new(args)
38
- # when_command ApplyDiscountCouponCommand(args)
39
- # then_fails_with CouponDoesNotExist
40
- # end
41
36
  # end
42
37
  module CommandHandlerHelpers
43
38
 
@@ -125,20 +120,11 @@ module Sequent
125
120
  def when_command command
126
121
  raise "@command_handler is mandatory when using the #{self.class}" unless @command_handler
127
122
  raise "Command handler #{@command_handler} cannot handle command #{command}, please configure the command type (forgot an include in the command class?)" unless @command_handler.handles_message?(command)
128
- begin
129
- @command_handler.handle_message(command)
130
- rescue => e
131
- @unhandled_error = e
132
- end
123
+ @command_handler.handle_message(command)
133
124
  @repository.commit(command)
134
125
  @repository.clear
135
126
  end
136
127
 
137
- def then_fails_with clazz
138
- expect(@unhandled_error).to be_kind_of(clazz)
139
- @unhandled_error = nil
140
- end
141
-
142
128
  def then_events *events
143
129
  expect(@event_store.stored_events.map(&:class)).to eq(events.flatten(1).map(&:class))
144
130
  @event_store.stored_events.zip(events.flatten(1)).each do |actual, expected|
@@ -150,11 +136,6 @@ module Sequent
150
136
  then_events
151
137
  end
152
138
 
153
- def self.included(spec)
154
- spec.after do
155
- raise @unhandled_error if @unhandled_error
156
- end
157
- end
158
139
  end
159
140
  end
160
141
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sequent
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Vonk