Add a configuration option for parse_with_nokogiri
This commit is contained in:
parent
0d205e382b
commit
302f0dc1c6
@ -12,6 +12,7 @@ module Webrat
|
||||
end
|
||||
|
||||
class Configuration
|
||||
attr_accessor :parse_with_nokogiri
|
||||
|
||||
attr_accessor :mode
|
||||
|
||||
@ -20,6 +21,7 @@ module Webrat
|
||||
|
||||
def initialize
|
||||
self.open_error_files = true
|
||||
self.parse_with_nokogiri = true
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -8,6 +8,15 @@ describe Webrat::Configuration do
|
||||
after do
|
||||
Webrat.reset_for_test
|
||||
end
|
||||
|
||||
it "should have a mode" do
|
||||
Webrat.configuration.should respond_to(:mode)
|
||||
end
|
||||
|
||||
it "should use Nokogiri as the parser by default" do
|
||||
config = Webrat.configuration
|
||||
config.parse_with_nokogiri.should == true
|
||||
end
|
||||
|
||||
it "should open error files by default" do
|
||||
config = Webrat.configuration
|
||||
|
Loading…
Reference in New Issue
Block a user