예제 #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())
예제 #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())
예제 #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)
예제 #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)
예제 #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)
예제 #6
0
 def test_can_add_a_stylesheet(self):
     stylesheets = StyleSheets()
     stylesheets.add(StyleSheet('/foo.css'))
     assert_length(1, stylesheets)
예제 #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)
예제 #8
0
 def test_can_add_a_stylesheet(self):
     stylesheets = StyleSheets()
     stylesheets.add(StyleSheet('/foo.css'))
     assert_length(1, stylesheets)