clean up rspecs
This commit is contained in:
@@ -22,9 +22,8 @@ describe WpItems do
|
|||||||
WpItem.new(uri, name: 'escaped-url') <<
|
WpItem.new(uri, name: 'escaped-url') <<
|
||||||
WpItem.new(uri, name: 'link-tag') <<
|
WpItem.new(uri, name: 'link-tag') <<
|
||||||
WpItem.new(uri, name: 'script-tag') <<
|
WpItem.new(uri, name: 'script-tag') <<
|
||||||
WpItem.new(uri, name: 'style-tag'),
|
WpItem.new(uri, name: 'style-tag') <<
|
||||||
|
WpItem.new(uri, name: 'style-tag-import')
|
||||||
passive_detection2: WpItems.new << WpItem.new(uri, name: 'wp-table-reloaded')
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ describe WpPlugins do
|
|||||||
WpPlugin.new(uri, name: 'escaped-url') <<
|
WpPlugin.new(uri, name: 'escaped-url') <<
|
||||||
WpPlugin.new(uri, name: 'link-tag') <<
|
WpPlugin.new(uri, name: 'link-tag') <<
|
||||||
WpPlugin.new(uri, name: 'script-tag') <<
|
WpPlugin.new(uri, name: 'script-tag') <<
|
||||||
WpPlugin.new(uri, name: 'style-tag'),
|
WpPlugin.new(uri, name: 'style-tag') <<
|
||||||
|
WpPlugin.new(uri, name: 'style-tag-import')
|
||||||
passive_detection2: WpItems.new << WpItem.new(uri, name: 'wp-table-reloaded')
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,9 +21,8 @@ describe WpThemes do
|
|||||||
|
|
||||||
passive_detection: WpThemes.new << WpTheme.new(uri, name: 'theme1') <<
|
passive_detection: WpThemes.new << WpTheme.new(uri, name: 'theme1') <<
|
||||||
WpTheme.new(uri, name: 'theme 2') <<
|
WpTheme.new(uri, name: 'theme 2') <<
|
||||||
WpTheme.new(uri, name: 'theme-3'),
|
WpTheme.new(uri, name: 'theme-3') <<
|
||||||
|
WpTheme.new(uri, name: 'style-tag-import')
|
||||||
passive_detection2: WpItems.new << WpItem.new(uri, name: 'wp-table-reloaded')
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
<link rel="alternate" type="application/rss+xml" title="Example RSS Feed" href="http://example.com/feed"/>
|
<link rel="alternate" type="application/rss+xml" title="Example RSS Feed" href="http://example.com/feed"/>
|
||||||
<link rel="alternate" type="application/atom+xml" title="Example Atom Feed" href="http://example.com/feed/atom"/>
|
<link rel="alternate" type="application/atom+xml" title="Example Atom Feed" href="http://example.com/feed/atom"/>
|
||||||
<link rel="pingback" href="http://example.com/xmlrpc.php"/>
|
<link rel="pingback" href="http://example.com/xmlrpc.php"/>
|
||||||
<link rel='stylesheet' href='http://example.com/wp-content/items/link-tag/cache/7f8155a5485bc445ed0adb136722b.css?m=1224763007' type='text/css' media='screen'/>
|
<link rel='stylesheet'
|
||||||
|
href='http://example.com/wp-content/items/link-tag/cache/7f8155a5485bc445ed0adb136722b.css?m=1224763007'
|
||||||
|
type='text/css' media='screen'/>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var TB_pluginPath = 'http://www.welovebug.com/wp-content/items/js-source';
|
var TB_pluginPath = 'http://www.welovebug.com/wp-content/items/js-source';
|
||||||
@@ -24,10 +26,21 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#fancybox-loading.fancybox-ie div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://example.com/wp-content/items/style-tag/fancybox/fancy_loading.png', sizingMethod='scale'); }
|
#fancybox-loading.fancybox-ie div {
|
||||||
|
background: transparent;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://example.com/wp-content/items/style-tag/fancybox/fancy_loading.png', sizingMethod='scale');
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type='text/javascript' src='http://example.com/wp-content/items/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
<script type='text/javascript'
|
||||||
|
src='http://example.com/wp-content/items/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
||||||
|
|
||||||
|
<style type="text/css" media="all">
|
||||||
|
/* <![CDATA[ */
|
||||||
|
@import url("https://example.com/wp-content/items/style-tag-import/css/plugin.css?ver=1.9.4");
|
||||||
|
@import url("https://example.com/wp-content/items/style-tag-import/css/datatables.css?ver=1.9.4");
|
||||||
|
/* ]]> */
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="top">
|
<div class="top">
|
||||||
@@ -47,5 +60,6 @@
|
|||||||
<script type='text/javascript' src='http://platform.twitter.com/widgets.js?ver=1.0.0'></script>
|
<script type='text/javascript' src='http://platform.twitter.com/widgets.js?ver=1.0.0'></script>
|
||||||
|
|
||||||
<!-- a duplicate one -->
|
<!-- a duplicate one -->
|
||||||
<script type='text/javascript' src='http://example.com/wp-content/items/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
<script type='text/javascript'
|
||||||
|
src='http://example.com/wp-content/items/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/* <![CDATA[ */
|
|
||||||
@import url("https://site.com/wp-content/items/wp-table-reloaded/css/plugin.css?ver=1.9.4");
|
|
||||||
@import url("https://site.com/wp-content/items/wp-table-reloaded/css/datatables.css?ver=1.9.4");
|
|
||||||
/* ]]> */
|
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
<link rel="alternate" type="application/rss+xml" title="Example RSS Feed" href="http://example.com/feed"/>
|
<link rel="alternate" type="application/rss+xml" title="Example RSS Feed" href="http://example.com/feed"/>
|
||||||
<link rel="alternate" type="application/atom+xml" title="Example Atom Feed" href="http://example.com/feed/atom"/>
|
<link rel="alternate" type="application/atom+xml" title="Example Atom Feed" href="http://example.com/feed/atom"/>
|
||||||
<link rel="pingback" href="http://example.com/xmlrpc.php"/>
|
<link rel="pingback" href="http://example.com/xmlrpc.php"/>
|
||||||
<link rel='stylesheet' href='http://example.com/wp-content/plugins/link-tag/cache/7f8155a5485bc445ed0adb136722b.css?m=1224763007' type='text/css' media='screen'/>
|
<link rel='stylesheet'
|
||||||
|
href='http://example.com/wp-content/plugins/link-tag/cache/7f8155a5485bc445ed0adb136722b.css?m=1224763007'
|
||||||
|
type='text/css' media='screen'/>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var TB_pluginPath = 'http://www.welovebug.com/wp-content/plugins/js-source';
|
var TB_pluginPath = 'http://www.welovebug.com/wp-content/plugins/js-source';
|
||||||
@@ -24,10 +26,21 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#fancybox-loading.fancybox-ie div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://example.com/wp-content/plugins/style-tag/fancybox/fancy_loading.png', sizingMethod='scale'); }
|
#fancybox-loading.fancybox-ie div {
|
||||||
|
background: transparent;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://example.com/wp-content/plugins/style-tag/fancybox/fancy_loading.png', sizingMethod='scale');
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type='text/javascript' src='http://example.com/wp-content/plugins/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
<script type='text/javascript'
|
||||||
|
src='http://example.com/wp-content/plugins/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
||||||
|
|
||||||
|
<style type="text/css" media="all">
|
||||||
|
/* <![CDATA[ */
|
||||||
|
@import url("https://example.com/wp-content/plugins/style-tag-import/css/plugin.css?ver=1.9.4");
|
||||||
|
@import url("https://example.com/wp-content/plugins/style-tag-import/css/datatables.css?ver=1.9.4");
|
||||||
|
/* ]]> */
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="top">
|
<div class="top">
|
||||||
@@ -47,5 +60,6 @@
|
|||||||
<script type='text/javascript' src='http://platform.twitter.com/widgets.js?ver=1.0.0'></script>
|
<script type='text/javascript' src='http://platform.twitter.com/widgets.js?ver=1.0.0'></script>
|
||||||
|
|
||||||
<!-- a duplicate one -->
|
<!-- a duplicate one -->
|
||||||
<script type='text/javascript' src='http://example.com/wp-content/plugins/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
<script type='text/javascript'
|
||||||
|
src='http://example.com/wp-content/plugins/script-tag/s2member-o.php?ws_plugin__s2member_js_w_globals=1'></script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/* <![CDATA[ */
|
|
||||||
@import url("https://site.com/wp-content/plugins/wp-table-reloaded/css/plugin.css?ver=1.9.4");
|
|
||||||
@import url("https://site.com/wp-content/plugins/wp-table-reloaded/css/datatables.css?ver=1.9.4");
|
|
||||||
/* ]]> */
|
|
||||||
@@ -12,6 +12,12 @@
|
|||||||
<link type="text/css" rel="stylesheet" href="http://example.localhost/wp-content/themes/theme 2/javascript.js"/>
|
<link type="text/css" rel="stylesheet" href="http://example.localhost/wp-content/themes/theme 2/javascript.js"/>
|
||||||
<link type="text/css" rel="stylesheet" href="http://example.localhost/wp-content/themes/theme-3/test.png"/>
|
<link type="text/css" rel="stylesheet" href="http://example.localhost/wp-content/themes/theme-3/test.png"/>
|
||||||
|
|
||||||
|
<style type="text/css" media="all">
|
||||||
|
/* <![CDATA[ */
|
||||||
|
@import url("https://example.com/wp-content/themes/style-tag-import/css/plugin.css?ver=1.9.4");
|
||||||
|
@import url("https://example.com/wp-content/themes/style-tag-import/css/datatables.css?ver=1.9.4");
|
||||||
|
/* ]]> */
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="top">
|
<div class="top">
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/* <![CDATA[ */
|
|
||||||
@import url("https://site.com/wp-content/themes/wp-table-reloaded/css/plugin.css?ver=1.9.4");
|
|
||||||
@import url("https://site.com/wp-content/themes/wp-table-reloaded/css/datatables.css?ver=1.9.4");
|
|
||||||
/* ]]> */
|
|
||||||
@@ -155,11 +155,6 @@ shared_examples 'WpItems::Detectable' do
|
|||||||
@fixture = fixtures_dir + '/passive_detection.html'
|
@fixture = fixtures_dir + '/passive_detection.html'
|
||||||
@expected = expected[:passive_detection]
|
@expected = expected[:passive_detection]
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns the expected items' do
|
|
||||||
@fixture = fixtures_dir + '/passive_detection_2.html'
|
|
||||||
@expected = expected[:passive_detection2]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user