Fix #15
This commit is contained in:
@@ -4,12 +4,12 @@ describe WpTarget do
|
||||
|
||||
before :each do
|
||||
Browser.reset
|
||||
browser_options =
|
||||
@browser_options =
|
||||
{
|
||||
:config_file => SPEC_FIXTURES_CONF_DIR + '/browser/browser.conf.json',
|
||||
:cache_timeout => 0
|
||||
}
|
||||
@wp_target = WpTarget.new("http://example.localhost/", browser_options)
|
||||
@wp_target = WpTarget.new("http://example.localhost/", @browser_options)
|
||||
end
|
||||
|
||||
it_should_behave_like "WebSite"
|
||||
@@ -27,6 +27,14 @@ describe WpTarget do
|
||||
expect { WpTarget.new(nil) }.to raise_error
|
||||
expect { Wptarget.new('') }.to raise_error
|
||||
end
|
||||
|
||||
it "should add the http protocol if missing" do
|
||||
WpTarget.new("example.localhost/", @browser_options).url.should === "http://example.localhost/"
|
||||
end
|
||||
|
||||
it "should add the trailing slash to the url if missing" do
|
||||
WpTarget.new("lamp/wordpress", @browser_options).url.should === "http://lamp/wordpress/"
|
||||
end
|
||||
end
|
||||
|
||||
describe "#url" do
|
||||
|
||||
Reference in New Issue
Block a user