nesquena/rabl — pull request #278 by wyaeld (2012-06-29 04:06:01+00:00)
Title: fix partial test modifying the global view path

I'm seeing the renderer_test fail with the following errror

```
Rabl::Renderer #render asserts uses globally configured view paths => undefined local variable or method `content2' for # occured
at /home/wyaeld/rails_projects/rabl/test/renderer_test.rb:102:in `block (3 levels) in '
at /home/wyaeld/rails_projects/rabl/lib/rabl/renderer.rb:48:in `render'
at /home/wyaeld/rails_projects/rabl/lib/rabl/engine.rb:32:in `render'
at /home/wyaeld/rails_projects/rabl/lib/rabl/engine.rb:32:in `instance_eval'
at (eval):1:in `render'
at /home/wyaeld/rails_projects/rabl/lib/rabl/engine.rb:32:in `instance_eval'

194 passes, 0 failures, 1 errors in 0.156562 seconds
```

Which I traced to the Rabl.configuration.view_paths acting as global state that isn't always being cleaned up. One of the partial tests actually assigned a single path to it, so it becomes no longer an array, and then renderer blows up.

```
partial_test.rb:72
config.view_paths = tmp_path
```

Fixed by adding some teardown in the test at fault.