Search code examples
hamlsasscompass-sassmixinsstylesheet

Can sylesheets be tested in Rails?


Stylesheets used to use css which was a somewhat dumb framework. But now with sass, mixins and functions logic can be added to stylesheets. Just wondering with this change of paradigm if it is possible to test sass logic. Just a question out of curiosity.

Thanks


Solution

  • Sure, you can use Cucumber to test your views (element attributes, colors, content, layout, etc.) with some help from RSpec (though there is some disagreement about the proper roles).

    When should I test Views separately in Cucumber & RSpec workflow?