Ejemplo n.º 1
0
 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())
Ejemplo n.º 2
0
 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())
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
 def test_does_not_add_duplicate_stylesheets(self):
     stylesheets = StyleSheets()
     stylesheets.add(StyleSheet('/foo.css'))
     stylesheets.add(StyleSheet('/foo.css'))
     assert_length(1, stylesheets)
Ejemplo n.º 6
0
 def test_can_add_a_stylesheet(self):
     stylesheets = StyleSheets()
     stylesheets.add(StyleSheet('/foo.css'))
     assert_length(1, stylesheets)
Ejemplo n.º 7
0
 def test_does_not_add_duplicate_stylesheets(self):
     stylesheets = StyleSheets()
     stylesheets.add(StyleSheet('/foo.css'))
     stylesheets.add(StyleSheet('/foo.css'))
     assert_length(1, stylesheets)
Ejemplo n.º 8
0
 def test_can_add_a_stylesheet(self):
     stylesheets = StyleSheets()
     stylesheets.add(StyleSheet('/foo.css'))
     assert_length(1, stylesheets)