Don't require rubygems at runtime (Simon Rozet)
This commit is contained in:
parent
29186616f5
commit
987766b10d
@ -1,3 +1,9 @@
|
|||||||
|
== Git
|
||||||
|
|
||||||
|
* Minor enhancements
|
||||||
|
|
||||||
|
* Don't require rubygems at runtime (Simon Rozet)
|
||||||
|
|
||||||
== 0.4.5 / 2009-08-10
|
== 0.4.5 / 2009-08-10
|
||||||
|
|
||||||
* Major enhancements
|
* Major enhancements
|
||||||
|
@ -1,29 +1,9 @@
|
|||||||
require "rubygems"
|
|
||||||
|
|
||||||
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
|
||||||
|
|
||||||
module Webrat
|
module Webrat
|
||||||
# The common base class for all exceptions raised by Webrat.
|
# The common base class for all exceptions raised by Webrat.
|
||||||
class WebratError < StandardError
|
class WebratError < StandardError
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.require_xml
|
|
||||||
if on_java?
|
|
||||||
gem "nokogiri", ">= 1.2.4"
|
|
||||||
else
|
|
||||||
gem "nokogiri", ">= 1.0.6"
|
|
||||||
end
|
|
||||||
|
|
||||||
require "nokogiri"
|
|
||||||
require "webrat/core/xml/nokogiri"
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.on_java?
|
|
||||||
RUBY_PLATFORM =~ /java/
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Webrat.require_xml
|
require "nokogiri"
|
||||||
|
require "webrat/core/xml/nokogiri"
|
||||||
require "webrat/core"
|
require "webrat/core"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
require "webrat"
|
require "webrat"
|
||||||
gem "selenium-client", ">=1.2.16"
|
|
||||||
require "selenium/client"
|
require "selenium/client"
|
||||||
require "webrat/selenium/silence_stream"
|
require "webrat/selenium/silence_stream"
|
||||||
require "webrat/selenium/selenium_session"
|
require "webrat/selenium/selenium_session"
|
||||||
|
@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|||||||
|
|
||||||
module Webrat
|
module Webrat
|
||||||
describe Field do
|
describe Field do
|
||||||
unless Webrat.on_java?
|
unless RUBY_PLATFORM =~ /java/
|
||||||
it "should have nice inspect output" do
|
it "should have nice inspect output" do
|
||||||
html = <<-HTML
|
html = <<-HTML
|
||||||
<html>
|
<html>
|
||||||
|
Loading…
Reference in New Issue
Block a user