usecasing 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -0
- data/lib/usecasing/context.rb +4 -0
- data/lib/usecasing/version.rb +1 -1
- data/spec/context_spec.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2ZiYzViMGUwOGViZTg0NDI2NzhkMjAyMDJmNTI3Mzk4Zjk4ODc2OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmIxNzExYzA2MzljNDFiZTA1M2ZkNWU0MDNlY2VhYWUwOTdhZGZmNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjhkYTgyODc5MTU2Y2NlN2NmOTEzNjRlY2QzOTM1OGRkMTZmMzE3OTgwM2E1
|
10
|
+
NDAxOGMyMDBkYmNmZmNkNTQyYTU2MGJlMDYzZjllYTZiZGE3YTU0OGExOWY2
|
11
|
+
MDAxOTA4NWFhYzE2NmE1ZjkyMWE1ZmNjZDI5YjMyNjdlNDFiZmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGVhZTAxNWQwNjIwYjUyZjJlMWI0Y2Y4ZjVmM2VmNTNhZmVhNWMyOGI2ZWMw
|
14
|
+
MTc4NjE2ZGMzYWMzZmYxMWVjYTAwNmE3MTkwMjJlODBiOTFlYzMwOGYyZTc4
|
15
|
+
MjRlYTNhMmU5MGUwOTUzN2Y1MjJjMWM4YmI0OWY5ZjkzNzA4Mzc=
|
data/README.md
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
## Installation
|
5
5
|
|
6
6
|
[![Build Status](https://secure.travis-ci.org/tdantas/usecasing.png)](http://travis-ci.org/tdantas/usecasing)
|
7
|
+
[![Dependency Status](https://gemnasium.com/tdantas/usecasing.svg)](https://gemnasium.com/tdantas/usecasing)
|
8
|
+
|
7
9
|
|
8
10
|
Add this line to your application's Gemfile:
|
9
11
|
|
data/lib/usecasing/context.rb
CHANGED
data/lib/usecasing/version.rb
CHANGED
data/spec/context_spec.rb
CHANGED
@@ -86,5 +86,20 @@ describe UseCase::Context do
|
|
86
86
|
expect(context.to_hash).to eql({ name: 'thiago' , last_name: 'dantas'})
|
87
87
|
end
|
88
88
|
|
89
|
+
it "iterates successfully over errors" do
|
90
|
+
context = described_class.new({})
|
91
|
+
context.failure(:error_1, "this is the first error")
|
92
|
+
context.failure(:error_2, "this is a second error")
|
93
|
+
|
94
|
+
errors_keys = [];
|
95
|
+
errors_values = [];
|
96
|
+
context.errors.each do |k, v|
|
97
|
+
errors_keys << k
|
98
|
+
errors_values << v;
|
99
|
+
end
|
100
|
+
|
101
|
+
expect(errors_keys).to eql([:error_1, :error_2])
|
102
|
+
expect(errors_values).to eql([["this is the first error"], ["this is a second error"]])
|
103
|
+
end
|
89
104
|
end
|
90
105
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usecasing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Dantas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|