rails/jquery-rails — pull request #153 by georgeclaghorn (2014-03-14 02:16:30+00:00)
Title: Allow whitespace before method call in assert_select_jquery.

In Javascript, whitespace is permitted between function calls, like so:

```js
$('#new_subscription')
.append("

You’ve been added to the mailing list. Thanks!

")
.find('input[type=email]')
.val('');
```

The following assertion using `assert_select_jquery` fails on the above example with the latest version of the `jquery-rails` gem:

```ruby
assert_select_jquery :append, '#new_subscription'
```

The above assertion fails because `assert_select_jquery` assumes no whitespace between the jQuery call and the `append` method call. This pull request modifies the regular expression generated in `assert_select_jquery` to permit legal whitespace.