cucumber/cucumber-rails — pull request #233 by pivotal-casebook (2013-02-07 17:10:34+00:00)
Title: Fix javascript cleaning strategy

If any non-JS scenarios run after at least two consecutive JS scenarios, the strategy will not be set correctly. This is because after a JS scenario, it does not reset to the original strategy, and on the second consecutive JS scenario, it sets `original_strategy` to whatever it is already, which happens to still be the JS-specific strategy from the previous scenario run.

```
Given: strategy = :transaction
javascript_strategy = :truncation

Type │ original_strategy set to
───────┼─────────────────────────
non-JS │ nil
JS │ :transaction
non-JS │ nil
JS │ :transaction
JS │ :truncation
non-JS │ :truncation
```

The included tests fail on master, which shows that the above is true.