serviz 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serviz/version.rb +1 -1
- data/spec/scenarios.rb +18 -0
- data/spec/serviz_spec.rb +21 -2
- data/spec/spec_helper.rb +2 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5c7ab5aa65d4e38eb1dc46293514d3b0c2646e42e0e57e564d6da528ba5641c
|
4
|
+
data.tar.gz: '03591abc857c6138c2d3eb595547373dd75cf9aa7a2855693566f384325a7da3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '081c3fadf6244312e478e99e6d85b386140f317e544f230f8f648bdfe1a34d48502cb581d50c524ae481dd1d56e9360ac52674e04dd7680e37bd3365d08274e7'
|
7
|
+
data.tar.gz: 251d149787e0460e3039e539c881aac1ae8a7f4a4d92afccccb9e105c2c6d016faff54bae0acabd632b4646ae9ef3d2ee0184af6eff50a25d5cc53aa20d54ef5
|
data/lib/serviz/version.rb
CHANGED
data/spec/scenarios.rb
ADDED
data/spec/serviz_spec.rb
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
RSpec.describe Serviz::Base do
|
2
|
-
it "
|
3
|
-
|
2
|
+
it "operation success" do
|
3
|
+
user = 'random_user'
|
4
|
+
operation = RegisterUser.call(user)
|
5
|
+
|
6
|
+
expect(operation.success?).to eq true
|
7
|
+
expect(operation.failure?).to eq false
|
8
|
+
expect(operation.errors).to be_empty
|
9
|
+
expect(operation.result).to eq user
|
10
|
+
end
|
11
|
+
|
12
|
+
it "operation error" do
|
13
|
+
operation = RegisterUser.call(nil)
|
14
|
+
|
15
|
+
expect(operation.success?).to eq false
|
16
|
+
expect(operation.failure?).to eq true
|
17
|
+
expect(operation.errors).not_to be_empty
|
18
|
+
expect(operation.result).to eq nil
|
19
|
+
end
|
20
|
+
|
21
|
+
it "raises exception if #call is not defined" do
|
22
|
+
expect { NoCall.call }.to raise_error NotImplementedError
|
4
23
|
end
|
5
24
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serviz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description: Command object Interface for Ruby
|
56
56
|
email:
|
57
57
|
- srmarc.ai@gmail.com
|
58
58
|
executables: []
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- lib/serviz.rb
|
63
63
|
- lib/serviz/version.rb
|
64
|
+
- spec/scenarios.rb
|
64
65
|
- spec/serviz_spec.rb
|
65
66
|
- spec/spec_helper.rb
|
66
67
|
homepage: https://github.com/markets/serviz
|
@@ -82,11 +83,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
83
|
- !ruby/object:Gem::Version
|
83
84
|
version: '0'
|
84
85
|
requirements: []
|
85
|
-
|
86
|
-
rubygems_version: 2.7.6
|
86
|
+
rubygems_version: 3.0.3
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
|
-
summary:
|
89
|
+
summary: Command object Interface for Ruby
|
90
90
|
test_files:
|
91
|
-
- spec/
|
91
|
+
- spec/scenarios.rb
|
92
92
|
- spec/serviz_spec.rb
|
93
|
+
- spec/spec_helper.rb
|