|
109 | 109 | end
|
110 | 110 | end
|
111 | 111 | end
|
| 112 | + |
| 113 | + describe "several" do |
| 114 | + describe "when all specified aspect ratios exactly match the allowed list" do |
| 115 | + let(:model_attribute) { :allowing_several } |
| 116 | + subject { matcher.allowing(:portrait, :square) } |
| 117 | + |
| 118 | + it { is_expected_to_match_for(klass) } |
| 119 | + end |
| 120 | + |
| 121 | + describe "when some specified aspect ratios match but not all" do |
| 122 | + let(:model_attribute) { :allowing_several } |
| 123 | + subject { matcher.allowing(:landscape, :square) } |
| 124 | + |
| 125 | + it { is_expected_not_to_match_for(klass) } |
| 126 | + end |
| 127 | + |
| 128 | + describe "when none of the specified aspect ratios match" do |
| 129 | + let(:model_attribute) { :allowing_several } |
| 130 | + subject { matcher.allowing(:landscape, :is_4_3) } |
| 131 | + |
| 132 | + it { is_expected_not_to_match_for(klass) } |
| 133 | + end |
| 134 | + end |
112 | 135 | end
|
113 | 136 |
|
114 | 137 | describe "#rejecting" do
|
|
172 | 195 | end
|
173 | 196 | end
|
174 | 197 | end
|
| 198 | + |
| 199 | + describe "several" do |
| 200 | + describe "when rejecting aspect ratios that are not in the allowed list" do |
| 201 | + let(:model_attribute) { :allowing_several } |
| 202 | + subject { matcher.rejecting(:landscape, :square) } |
| 203 | + |
| 204 | + it { is_expected_to_match_for(klass) } |
| 205 | + end |
| 206 | + |
| 207 | + describe "when rejecting some aspect ratios that overlap with the allowed list" do |
| 208 | + let(:model_attribute) { :allowing_several } |
| 209 | + subject { matcher.rejecting(:landscape, :square) } |
| 210 | + |
| 211 | + it { is_expected_not_to_match_for(klass) } |
| 212 | + end |
| 213 | + |
| 214 | + describe "when rejecting aspect ratios that are in the allowed list" do |
| 215 | + let(:model_attribute) { :allowing_several } |
| 216 | + subject { matcher.rejecting(:square, :portrait) } |
| 217 | + |
| 218 | + it { is_expected_not_to_match_for(klass) } |
| 219 | + end |
| 220 | + end |
175 | 221 | end
|
176 | 222 |
|
177 | 223 | describe "Combinations" do
|
|
0 commit comments