Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some missing spec coverage. Bump coverage theshold
- Loading branch information
Showing
7 changed files
with
92 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper") | ||
|
||
describe Webrat::Logging do | ||
include Webrat::Logging | ||
|
||
it "should log to RAILS_DEFAULT_LOGGER" do | ||
logger = mock("logger") | ||
RAILS_DEFAULT_LOGGER = logger | ||
logger.should_receive(:debug).with("Testing") | ||
debug_log "Testing" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper") | ||
|
||
describe Webrat::Session do | ||
|
||
it "should not have a doc_root" do | ||
session = Webrat::Session.new | ||
session.doc_root.should be_nil | ||
end | ||
|
||
it "should expose the current_dom" do | ||
session = Webrat::Session.new | ||
|
||
def session.response_body | ||
"<html></html>" | ||
end | ||
|
||
session.current_dom.should be_an_instance_of(Hpricot::Doc) | ||
end | ||
|
||
it "should open the page in the browser" do | ||
session = Webrat::Session.new | ||
session.should_receive(:`).with("open path") | ||
session.open_in_browser("path") | ||
end | ||
|
||
it "should provide a current_page for backwards compatibility" do | ||
session = Webrat::Session.new | ||
current_page = session.current_page | ||
current_page.should_not be_nil | ||
current_page.should respond_to(:url) | ||
end | ||
|
||
end |