compatriot 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/compatriot/assertions.rb +14 -10
- data/lib/compatriot/version.rb +1 -1
- 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: d450836b0c2e68d09d5ca4e810c0e1e1d020bc4b
|
4
|
+
data.tar.gz: 8379ba8e3caa26f2d74d000a7086e112869abe86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d637ff6d079e9bf66de3738fe7bf40ef9516c3cbd2504c272eed8400a656962c389e051e5fa073facf421e399bf18a301027eaf2e3fc0e89b396486b7f7dbba
|
7
|
+
data.tar.gz: e43b8be36412ac6d6de2e733bb0f6d6753ce1f0e21326060d986829911047f31e894c745a7f535fbfe3fe2846248d975f96ed1ce159e662273919b625f31c2e7
|
@@ -1,14 +1,18 @@
|
|
1
|
-
|
2
|
-
def assert_no_ui_changes(title = '')
|
3
|
-
diff = Compatriot.percentage_changed(self, title)
|
4
|
-
diff_file = Compatriot.filepath_for_screenshot('diffs', Compatriot.filename_for_test(self, title))
|
5
|
-
puts "% diff is #{diff}. #{diff_file}" if Compatriot.show_diffs
|
6
|
-
pass = diff <= Compatriot.ui_difference_threshold
|
1
|
+
require 'compatriot'
|
7
2
|
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
module Compatriot
|
4
|
+
module Assertions
|
5
|
+
def assert_no_ui_changes(title = '')
|
6
|
+
diff = Compatriot.percentage_changed(self, title)
|
7
|
+
diff_file = Compatriot.filepath_for_screenshot('diffs', Compatriot.filename_for_test(self, title))
|
8
|
+
puts "% diff is #{diff}. #{diff_file}" if Compatriot.show_diffs
|
9
|
+
pass = diff <= Compatriot.ui_difference_threshold
|
10
|
+
|
11
|
+
unless pass
|
12
|
+
puts "Diff > ThresholdFailed: see #{diff_file}"
|
13
|
+
end
|
11
14
|
|
12
|
-
|
15
|
+
assert pass, "The difference in the page (#{diff}%) is greater then the threshold #{Compatriot.ui_difference_threshold}"
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
data/lib/compatriot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compatriot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carol (Nichols || Goulding)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|