morse_spec_helpers 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/morse_spec_helpers/version.rb +1 -1
- data/lib/morse_spec_helpers.rb +28 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afb72d77455d082efe2e292b4432f925545dd094
|
4
|
+
data.tar.gz: 059f4e71c2a131cf3f28796af5e14583348ef623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39aadcba194194a3fa8a778d1422f169766bfd67eb7a2a8b062e85657fb88519c678304c420ded1398f6372a40e3f7109970bd24079e5b4d01bd2f1c2aa1a52f
|
7
|
+
data.tar.gz: 95dda0a0e34c35fc652c19a7c91976b3c27dbe4f98d401b5a609d338771278db357a8b48e72af4213ec14e2cb60efbd6478acbc5d51ad21521af4c3e30f744a1
|
data/lib/morse_spec_helpers.rb
CHANGED
@@ -91,6 +91,34 @@ module MorseSpecHelpers
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
def mandatory_float(method)
|
95
|
+
context "#{method} is a mandatory float" do
|
96
|
+
it "should reject a blank #{method}" do
|
97
|
+
@instance.send("#{method}=","")
|
98
|
+
expect(@instance).not_to be_valid
|
99
|
+
end
|
100
|
+
it "should accept a normal float for #{method}" do
|
101
|
+
@instance.send("#{method}=",1.1)
|
102
|
+
expect(@instance).to be_valid
|
103
|
+
end
|
104
|
+
mandatory_thing(method)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def mandatory_integer(method)
|
109
|
+
context "#{method} is a mandatory integer" do
|
110
|
+
it "should reject a blank #{method}" do
|
111
|
+
@instance.send("#{method}=","")
|
112
|
+
expect(@instance).not_to be_valid
|
113
|
+
end
|
114
|
+
it "should accept a normal integer for #{method}" do
|
115
|
+
@instance.send("#{method}=",1)
|
116
|
+
expect(@instance).to be_valid
|
117
|
+
end
|
118
|
+
mandatory_thing(method)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
94
122
|
def mandatory_relation(method)
|
95
123
|
context "#{method}" do
|
96
124
|
exists(method)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morse_spec_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terry S
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|