Skip to content

Commit

Permalink
add start_with and end_with matchers to README [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Apr 10, 2012
1 parent 2e0cdbc commit 35d98aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -129,15 +129,23 @@ actual.should have_xxx(:arg) # passes if actual.has_xxx?(:arg)

```ruby
actual.should include(expected)
actual.should start_with(expected)
actual.should end_with(expected)
```

#### Examples

```ruby
[1,2,3].should include(1)
[1,2,3].should include(1, 2)
[1,2,3].should start_with(1)
[1,2,3].should start_with(1,2)
[1,2,3].should end_with(3)
[1,2,3].should end_with(2,3)
{:a => 'b'}.should include(:a => 'b')
"this string".should include("is str")
"this string".should start_with("this")
"this string".should end_with("ring")
```

## Also see
Expand Down

0 comments on commit 35d98aa

Please sign in to comment.