rasantiago-tiny_xpath_helper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/init.rb CHANGED
@@ -1 +1 @@
1
- require File.join(File.dirname(__FILE__), "lib", "tiny_path_helper")
1
+ require File.join(File.dirname(__FILE__), "lib", "tiny_xpath_helper")
@@ -61,6 +61,7 @@ class TinyXPathHelper
61
61
  format = options[:format] || :text
62
62
  if format == :array
63
63
  options.update( :format => :text, :find => :all )
64
+ format = :text
64
65
  end
65
66
 
66
67
  count = options[:find] || :first
@@ -5,4 +5,9 @@ class TinyXPathHelperTest < ActiveSupport::TestCase
5
5
  xpath = TinyXPathHelper.new("<xml/>")
6
6
  assert xpath.first('*').nil?
7
7
  end
8
+
9
+ test "find_xpath with :format => :array doesn't crash" do
10
+ xpath = TinyXPathHelper.new("<xml><a/></xml>")
11
+ assert xpath.find_xpath('*', :format => :array)
12
+ end
8
13
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tiny_xpath_helper}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.authors = ["Jesse Wolfe"]
8
8
  s.date = %q{2009-06-01}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasantiago-tiny_xpath_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Wolfe