spec/spec_helper.rb in roxml-2.5.3 vs spec/spec_helper.rb in roxml-3.1.0

- old
+ new

@@ -1,33 +1,14 @@ +require 'rubygems' require 'pathname' +require 'test/support/fixtures' +require 'lib/roxml' -module ROXML - SILENCE_XML_NAME_WARNING = true -end +require 'spec/shared_specs' if defined?(Spec) -DIR = Pathname.new(__FILE__ + '../..').expand_path.dirname -LOAD_PATH = DIR.join('lib').to_s -$LOAD_PATH.unshift(LOAD_PATH) unless - $LOAD_PATH.include?(LOAD_PATH) || $LOAD_PATH.include?(File.expand_path(LOAD_PATH)) -require 'roxml' - -require File.join(File.dirname(__FILE__), 'shared_specs') - -def example(name) - DIR.join("examples/#{name}.rb") +def xml_for(name) + Pathname.new(File.dirname(__FILE__)).expand_path.dirname.join("examples/xml/#{name}.xml") end -def fixture(name) - File.read(fixture_path(name)) +class RoxmlObject + include ROXML end - -def xml_fixture(name) - ROXML::XML::Parser.parse_file(fixture_path(name)).root -end - -def fixture_path(name) - "test/fixtures/#{name}.xml" -end - -def xml_for(name) - DIR.join("examples/xml/#{name}.xml") -end \ No newline at end of file