README.md in rspec-its-1.1.0 vs README.md in rspec-its-1.2.0

- old
+ new

@@ -1,6 +1,6 @@ -# RSpec::Its [![Build Status](https://travis-ci.org/rspec/rspec-its.png)](https://travis-ci.org/rspec/rspec-its) +# RSpec::Its [![Build Status](https://travis-ci.org/rspec/rspec-its.svg)](https://travis-ci.org/rspec/rspec-its) RSpec::Its provides the `its` method as a short-hand to specify the expected value of an attribute. ## Installation @@ -34,9 +34,17 @@ You can use a string with dots to specify a nested attribute (i.e. an attribute of the attribute of the subject). its("phone_numbers.size") { should_not eq(0) } +The following expect-style method is also available: + + its(:size) { is_expected.to eq(1) } + +as is this alias for pluralized use: + + its(:keys) { are_expected.to eq([:key1, :key2]) + When the subject implements the `[]` operator, you can pass in an array with a single key to refer to the value returned by that operator when passed that key as an argument. its([:key]) { is_expected.to eq(value) }