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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5f3fe79e1df887a64a4199746a116f1b1b21507
4
- data.tar.gz: b89826f89e27b3a505601a0d86f13458349b6708
3
+ metadata.gz: d450836b0c2e68d09d5ca4e810c0e1e1d020bc4b
4
+ data.tar.gz: 8379ba8e3caa26f2d74d000a7086e112869abe86
5
5
  SHA512:
6
- metadata.gz: 7fe484047be403873aeaa2b7311fbefb23557f0b492fd15f515e3a7b8522cd0bd9e165ee1b05640e230b6881b3930e2ec71e6a2c6950ce35ab17994d131fda4a
7
- data.tar.gz: 73691e6f9298e8ccaba766e5ea11f37793b3a75dea9daab680642c5a7edddcc511bcf7f9ee0546403159db9f3979d93142dd53753a5f3f01a01c2e76924dcbab
6
+ metadata.gz: 7d637ff6d079e9bf66de3738fe7bf40ef9516c3cbd2504c272eed8400a656962c389e051e5fa073facf421e399bf18a301027eaf2e3fc0e89b396486b7f7dbba
7
+ data.tar.gz: e43b8be36412ac6d6de2e733bb0f6d6753ce1f0e21326060d986829911047f31e894c745a7f535fbfe3fe2846248d975f96ed1ce159e662273919b625f31c2e7
@@ -1,14 +1,18 @@
1
- module Compatriot::Assertions
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
- unless pass
9
- puts "Diff > ThresholdFailed: see #{diff_file}"
10
- end
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
- assert pass, "The difference in the page (#{diff}%) is greater then the threshold #{Compatriot.ui_difference_threshold}"
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
@@ -1,3 +1,3 @@
1
1
  module Compatriot
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-05 00:00:00.000000000 Z
12
+ date: 2016-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest