jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

css dependent fixtures #223

Closed brewster1134 closed 10 years ago

brewster1134 commented 10 years ago

How would you apply styles to fixtures (aside from writing them inline)? The JS library I am testing depends on some box-model related styles. using a script tag in the fixture does not seem to work, seemingly because the fixtures are not added to the dom.

<style>
  div {
    width: 100px;
  }
</style>

<div>foo</div>
jejacks0n commented 10 years ago

Add to the stylesheets configuration. Also fixtures can include CSS in a style tag.

brewster1134 commented 10 years ago

sorry i had a typo in my example... i meant