rectify 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rectify/rspec/stub_form.rb +8 -2
- data/lib/rectify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffd5e82c02a959c4d8c766a987d1c792b7429f9c
|
4
|
+
data.tar.gz: 7b4c4098bf7c3cbe4542b91ba5c5f52cd431107c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ead461a3c15a5624c0da681619afa11e4d0e9049115e830457d6cdefe5d40279e296eba1f00b71e28c5396e3d51e595b2a717fc080c5768b7fb1df14f055d5b
|
7
|
+
data.tar.gz: 29b7fe574d3891a8856a4fdebd72385c46b4940c2d3519460862edd03bc8ba7f7a328a1281aeb38725d6f68d6ff1a149593616fe10157350461cc266bbbc442b
|
@@ -1,11 +1,17 @@
|
|
1
1
|
module Rectify
|
2
2
|
class StubForm
|
3
|
-
attr_accessor :attributes
|
4
|
-
|
5
3
|
def initialize(attributes)
|
6
4
|
@attributes = attributes
|
7
5
|
end
|
8
6
|
|
7
|
+
def attributes
|
8
|
+
@attributes.except!(:valid?)
|
9
|
+
end
|
10
|
+
|
11
|
+
def valid?
|
12
|
+
@attributes.fetch(:valid?, false)
|
13
|
+
end
|
14
|
+
|
9
15
|
def invalid?
|
10
16
|
!valid?
|
11
17
|
end
|
data/lib/rectify/version.rb
CHANGED