soveran / cuba

Rum based microframework for web development.
http://cuba.is
MIT License
1.44k stars 249 forks source link

Fix render tests if erubis is installed #44

Closed jeremyevans closed 10 years ago

jeremyevans commented 10 years ago

Tilt automatically uses erubis to render erb if erubis is installed, and the two handle whitespace slightly differently.

soveran commented 10 years ago

I think the goal of the tests is to verify that everything works with the minimum set of gems (those defined in .gems). As erubis is not listed, I think this test is more for Tilt itself, and shouldn't be included here. But I'd like to hear from @cyx, @frodsan and @djanowski too.

cyx commented 10 years ago

I think having erubis is more of a special case, and also given our methodology of isolating gemsets via @soveran/gs then the scenario is not likely to happen in a test scenario.

jeremyevans commented 10 years ago

The default makefile just runs cutest, it doesn't attempt to isolate gemsets. I agree that if you attempt to isolate gemsets to ensure that tilt will not pick up erubis automatically, it makes sense not to apply the patch. However, that doesn't seem to be the case currently, unless the recommended way to test it not via make test. In which case, the proper way to test cuba itself should be documented (apologies if it is already and I missed it)

soveran commented 10 years ago

Good point, I just added a Contributing section to the README. In general, I think we assume no other gems are modifying the environment. The fact that erubis being installed changes the behavior of Tilt is sad.