README.md in capybara-screenshot-diff-0.5.3 vs README.md in capybara-screenshot-diff-0.6.0
- old
+ new
@@ -99,10 +99,11 @@
```ruby
setup do
screenshot_section 'my_feature'
end
+
test 'my subfeature' do
screenshot_group 'subfeature'
visit '/feature'
click_button 'Interresting button'
screenshot 'subfeature_index'
@@ -236,9 +237,29 @@
shot will be taken and compared to the first. This is repeated until two
subsequent screen shots are identical.
```ruby
Capybara::Screenshot.stability_time_limit = 0.5
+```
+
+
+
+### Allowed color distance
+
+Sometimes you want to allow small differences in the images. You can set set the 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
+end
+```
+
+The difference is calculated as the eucledian distance. You can also set this globally:
+
+```ruby
+Capybara::Screenshot::Diff.color_distance_limit = 42
```
## Development