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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca8b5f48a9cc63f363a47d751e319c0efa2bba06
4
- data.tar.gz: 9219089201898b1be1e1f7fcbd0f45564c4d38e5
3
+ metadata.gz: afb72d77455d082efe2e292b4432f925545dd094
4
+ data.tar.gz: 059f4e71c2a131cf3f28796af5e14583348ef623
5
5
  SHA512:
6
- metadata.gz: 5853dc75cd85d34d71cec14dc26fe4201364e4a8d9f56a3c7a080ad897fd5d988d7e82a1ecf62fd7a2abf8009a7019a5e22bd80fc82f9444af1f63459c8957e8
7
- data.tar.gz: 671c1cce6ae49c6ac41318a97d6f71ebd63d4faf29242d3f0473bd0a1f67aacde1b130502b3ea27a9d8b28ceaf0bd0e97af12536f2d223b8e38ed6f5bad7c06d
6
+ metadata.gz: 39aadcba194194a3fa8a778d1422f169766bfd67eb7a2a8b062e85657fb88519c678304c420ded1398f6372a40e3f7109970bd24079e5b4d01bd2f1c2aa1a52f
7
+ data.tar.gz: 95dda0a0e34c35fc652c19a7c91976b3c27dbe4f98d401b5a609d338771278db357a8b48e72af4213ec14e2cb60efbd6478acbc5d51ad21521af4c3e30f744a1
@@ -1,3 +1,3 @@
1
1
  module MorseSpecHelpers
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -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.11
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-04 00:00:00.000000000 Z
11
+ date: 2014-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler