rails_model_stacker 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dc6182223668bdf8786a5d41d3a9ee42e9a52d4
|
4
|
+
data.tar.gz: 86f75be0d2feae1a80e35e9801dce623fde439d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd93d2050b17d461c4b31c9cec17e3f201dc77517d6eaf7b4a7f6157e098dbb9194b23a61200a432a9b79836f63aedfd37c5522db7225ee380e73b68702d4599
|
7
|
+
data.tar.gz: 976206a92981b146c8fd43addf4cbd9ba4cd44244e7acb14979444678ac707cae40ce7592209ef580f69d64e207442013d3f7ff6d27b5f14b5378f41dcf0332c
|
@@ -28,11 +28,25 @@ module SpecStacker
|
|
28
28
|
|
29
29
|
##
|
30
30
|
#test if all attributes have_and_belong_to_many
|
31
|
-
#+
|
31
|
+
#+attributes+:: array of symbols of attributes
|
32
32
|
#
|
33
33
|
#the normal identifier is too long.
|
34
34
|
def should_all_join attributes
|
35
35
|
should_all attributes, :have_and_belong_to_many
|
36
36
|
end
|
37
37
|
|
38
|
+
##
|
39
|
+
#test if attributes belong_to
|
40
|
+
#+attribtes+:: array of symbols of attributes
|
41
|
+
def should_all_belong_to attributes
|
42
|
+
should_all attributes, :belong_to
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
#test if model has_many attributes
|
47
|
+
#+attributes+:: array of symbols of attributes
|
48
|
+
def should_all_have_many attributes
|
49
|
+
should_all attributes, :have_many
|
50
|
+
end
|
51
|
+
|
38
52
|
end
|
data/rails_model_stacker.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "rails_model_stacker"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.4"
|
7
7
|
s.date = "2017-07-13"
|
8
8
|
s.summary = "Rails Model Stacker"
|
9
9
|
s.description = "Shorter Active Record validations and associations with RSpec and shoulda support"
|