def test_can_render_markup_for_all_stylesheets(self): foo_script = StyleSheet('/foo.css') bar_script = StyleSheet('/bar.css') stylesheets = StyleSheets() stylesheets.add(foo_script) stylesheets.add(bar_script) assert_equals(unicode(foo_script)+unicode(bar_script), stylesheets.render())
def test_can_replace_stylesheet_with_key(self): foo_script = StyleSheet('/foo.css', key='foo') bar_script = StyleSheet('/bar.css', key='foo') stylesheets = StyleSheets() stylesheets.add(foo_script) stylesheets.replace_stylesheet_with_key(bar_script) assert_length(1, stylesheets) assert_contains(bar_script, stylesheets.stylesheets)
def test_does_not_add_duplicate_stylesheets(self): stylesheets = StyleSheets() stylesheets.add(StyleSheet('/foo.css')) stylesheets.add(StyleSheet('/foo.css')) assert_length(1, stylesheets)
def test_can_add_a_stylesheet(self): stylesheets = StyleSheets() stylesheets.add(StyleSheet('/foo.css')) assert_length(1, stylesheets)