README.md in equivalent-xml-0.4.3 vs README.md in equivalent-xml-0.4.4
- old
+ new
@@ -79,21 +79,28 @@
### Using with RSpec
EquivalentXml includes a custom matcher for RSpec (version >=1.2.4) that makes including XML
equivalencies in your spec tests a cinch!
+Add below two line to `spec_helper.rb`:
+
+```ruby
+require 'rspec/matchers' # req by equivalent-xml custom matcher `be_equivalent_to`
+require 'equivalent-xml'
+```
+
Equivalency:
- node_1.should be_equivalent_to(node_2)
- node_1.should_not be_equivalent_to(node_2)
+ expect(node_1).to be_equivalent_to(node_2)
+ expect(node_1).not_to be_equivalent_to(node_2)
Chained modifiers:
- node_1.should be_equivalent_to(node_2).respecting_element_order
- node_1.should be_equivalent_to(node_2).with_whitespace_intact
- node_1.should be_equivalent_to(node_2).respecting_element_order.with_whitespace_intact
- node_1.should be_equivalent_to(node_2).ignoring_content_of("SerialNumber")
+ expect(node_1).to be_equivalent_to(node_2).respecting_element_order
+ expect(node_1).to be_equivalent_to(node_2).with_whitespace_intact
+ expect(node_1).to be_equivalent_to(node_2).respecting_element_order.with_whitespace_intact
+ expect(node_1).to be_equivalent_to(node_2).ignoring_content_of("SerialNumber")
## Contributing to equivalent-xml
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
@@ -104,10 +111,11 @@
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is
otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
## History
+- <b>0.4.4</b> - Fix rspec 3 deprecation warnings while maintaining compatibility with rspec 1 & 2 (w/assist from barelyknown & DanielHeath)
- <b>0.4.3</b> - Updates for rspec 3
- <b>0.4.2</b> - Move version back into gemspec for now
- <b>0.4.1</b> - Improved RSpec version checking (contrib. by elandesign)
- <b>0.4.0</b> - Added :ignore_attr_values option (contrib. by ivannovosad)
- <b>0.3.0</b> - Added :ignore_content option (contrib. by moklett)
@@ -129,7 +137,6 @@
- <b>0.1.1</b> - Removed explicit runtime dependency on nokogiri
- <b>0.1.0</b> - Initial release
## Copyright
-Copyright (c) 2011 Michael B. Klein. See LICENSE.txt for further details.
-
+Copyright (c) 2011-14 Michael B. Klein. See LICENSE.txt for further details.