README.md in capybara-screenshot-diff-0.9.0 vs README.md in capybara-screenshot-diff-0.9.1
- old
+ new
@@ -257,12 +257,12 @@
### Allowed color distance
Sometimes you want to allow small differences in the images. For example, Chrome renders the same
-page slightly differently sometimes. You can set set the difference threshold for the comparison
-using the `color_distance_limit` option to the `screenshot` method:
+page slightly differently sometimes. You can set set the color difference threshold for the
+comparison using the `color_distance_limit` option to the `screenshot` method:
```ruby
test 'color threshold' do
visit '/'
screenshot 'index', color_distance_limit: 30
@@ -271,9 +271,28 @@
The difference is calculated as the eucledian distance. You can also set this globally:
```ruby
Capybara::Screenshot::Diff.color_distance_limit = 42
+```
+
+
+### Allowed difference size
+
+You can set set a threshold for the differing area size for the comparison
+using the `area_size_limit` option to the `screenshot` method:
+
+```ruby
+test 'area threshold' do
+ visit '/'
+ screenshot 'index', area_size_limit: 17
+end
+```
+
+The difference is calculated as `width * height`. You can also set this globally:
+
+```ruby
+Capybara::Screenshot::Diff.area_size_limit = 42
```
## Development