morse_spec_helpers 0.0.10 → 0.0.11
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.rb +7 -7
- data/lib/morse_spec_helpers/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: ca8b5f48a9cc63f363a47d751e319c0efa2bba06
|
4
|
+
data.tar.gz: 9219089201898b1be1e1f7fcbd0f45564c4d38e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5853dc75cd85d34d71cec14dc26fe4201364e4a8d9f56a3c7a080ad897fd5d988d7e82a1ecf62fd7a2abf8009a7019a5e22bd80fc82f9444af1f63459c8957e8
|
7
|
+
data.tar.gz: 671c1cce6ae49c6ac41318a97d6f71ebd63d4faf29242d3f0473bd0a1f67aacde1b130502b3ea27a9d8b28ceaf0bd0e97af12536f2d223b8e38ed6f5bad7c06d
|
data/lib/morse_spec_helpers.rb
CHANGED
@@ -7,7 +7,7 @@ module MorseSpecHelpers
|
|
7
7
|
exists(method)
|
8
8
|
it "should default to false" do
|
9
9
|
new_thing=@instance.class.new
|
10
|
-
expect(new_thing.send(method)).to
|
10
|
+
expect(new_thing.send(method)).to be_falsey
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -15,7 +15,7 @@ module MorseSpecHelpers
|
|
15
15
|
exists(method)
|
16
16
|
it "should default to true" do
|
17
17
|
new_thing=@instance.class.new
|
18
|
-
expect(new_thing.send(method)).to
|
18
|
+
expect(new_thing.send(method)).to be_truthy
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -37,7 +37,7 @@ module MorseSpecHelpers
|
|
37
37
|
context "#{method}" do
|
38
38
|
exists(method)
|
39
39
|
it "should be an Array" do
|
40
|
-
expect(@instance.send(method).is_a?(Array)).to
|
40
|
+
expect(@instance.send(method).is_a?(Array)).to be_truthy
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -95,7 +95,7 @@ module MorseSpecHelpers
|
|
95
95
|
context "#{method}" do
|
96
96
|
exists(method)
|
97
97
|
it "should be an ActiveRecord::Relation" do
|
98
|
-
expect(@instance.send(method).is_a?(ActiveRecord::Relation)).to
|
98
|
+
expect(@instance.send(method).is_a?(ActiveRecord::Relation)).to be_truthy
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
@@ -398,7 +398,7 @@ module MorseSpecHelpers
|
|
398
398
|
expect(@instance.send(method)).to be_nil
|
399
399
|
@instance.send("#{method}_attachment_title=",nil)
|
400
400
|
@instance.send("#{method}_attachment=",fixture_file_upload("../support/images/placeholder.png", 'image/png'))
|
401
|
-
expect(@instance.valid?).to_not
|
401
|
+
expect(@instance.valid?).to_not be_truthy
|
402
402
|
expect(@instance.errors[method]).to_not be_empty
|
403
403
|
expect(@instance.send(method)).to be_nil
|
404
404
|
end
|
@@ -411,7 +411,7 @@ module MorseSpecHelpers
|
|
411
411
|
def processes_multiple_attachments_to_attribute(method)
|
412
412
|
describe "#{method} processing" do
|
413
413
|
it "should respond to #{method}" do
|
414
|
-
expect(@instance.respond_to?(method)).to
|
414
|
+
expect(@instance.respond_to?(method)).to be_truthy
|
415
415
|
end
|
416
416
|
describe "accessors" do
|
417
417
|
%w{attachment attachment_title attachment_alt attachment_remove}.each do |suffix|
|
@@ -438,7 +438,7 @@ module MorseSpecHelpers
|
|
438
438
|
expect(@instance.send(method)).to be_empty
|
439
439
|
@instance.send("#{method.to_s.singularize}_attachment_alt=",nil)
|
440
440
|
@instance.send("#{method.to_s.singularize}_attachment=",fixture_file_upload("../support/images/placeholder.png", 'image/png'))
|
441
|
-
expect(@instance.valid?).to_not
|
441
|
+
expect(@instance.valid?).to_not be_truthy
|
442
442
|
expect(@instance.errors[method]).to_not be_empty
|
443
443
|
expect(@instance.send(method)).to be_empty
|
444
444
|
end
|