-) custom plugins directory (outside of wp-content)

-) feedback from ewanlr
-) Regex fix for version detection from readme.txt due to false positives (tag-cloud-widget plugin)
This commit is contained in:
Christian Mehlmauer
2012-09-23 21:50:41 +02:00
parent 9b6a2805d7
commit a15028793e
46 changed files with 560 additions and 415 deletions

View File

@@ -27,7 +27,7 @@ describe WpTarget do
:config_file => SPEC_FIXTURES_CONF_DIR + '/browser/browser.conf.json',
:cache_timeout => 0,
:wp_content_dir => "wp-content",
:wp_plugins_dir => "plugins"
:wp_plugins_dir => "wp-content/plugins"
}
@wp_target = WpTarget.new("http://example.localhost/", @options)
end
@@ -153,20 +153,25 @@ describe WpTarget do
describe "#wp_plugins_dir" do
after :each do
@wp_target.stub(:wp_content_dir => @stub_value) if @stub_value
@wp_target.stub(:wp_plugins_dir => @stub_value) if @stub_value
@wp_target.wp_plugins_dir.should === @expected
end
it "should return the string set in the initialize method" do
@wp_target = WpTarget.new("http://example.localhost/", :wp_plugins_dir => "custom-plugins")
@wp_target = WpTarget.new("http://example.localhost/", :wp_content_dir => "asdf", :wp_plugins_dir => "custom-plugins")
@expected = "custom-plugins"
end
it "should return 'plugins'" do
@stub_value = "wp-content"
@stub_value = "plugins"
@expected = "plugins"
end
it "should return 'wp-content/plugins'" do
@stub_value = nil
@expected = "wp-content/plugins"
end
end
describe "#debug_log_url" do