コード例 #1
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)
コード例 #2
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)