Skip to content

Commit

Permalink
just documentation and more test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingzumwalt committed Jul 3, 2010
1 parent bd890eb commit bd1134f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.12

* Minor fix to Base.get_values_from_datstream (wasn't returning default values when necessary)

1.1.11

* fix to update_index preventing double-metadata
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ begin
gem.add_dependency('mime-types', '>= 1.16')
gem.add_dependency('multipart-post')
gem.add_dependency('nokogiri')
gem.add_dependency('om', '>= 0.1.7')
gem.add_dependency('om', '>= 0.1.9')
# gem.add_dependency('yaml')

gem.add_development_dependency "rspec", ">= 1.2.9"
Expand Down
4 changes: 2 additions & 2 deletions active-fedora.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{active-fedora}
s.version = "1.1.11"
s.version = "1.1.12"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Matt Zumwalt", "McClain Looney"]
s.date = %q{2010-07-02}
s.date = %q{2010-07-03}
s.description = %q{ActiveFedora provides for creating and managing objects in the Fedora Repository Architecture.}
s.email = %q{matt.zumwalt@yourmediashelf.com}
s.extra_rdoc_files = [
Expand Down
5 changes: 5 additions & 0 deletions spec/unit/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ class FooHistory < ActiveFedora::Base
@test_object.stubs(:datastreams_in_memory).returns({"ds1"=>mock_ds})
@test_object.get_values_from_datastream("ds1", "--my xpath--").should == ["value1", "value2"]
end
it "should return the default value if the result is empty" do
mock_ds = mock("Datastream", :get_values=>[])
@test_object.stubs(:datastreams_in_memory).returns({"ds1"=>mock_ds})
@test_object.get_values_from_datastream("ds1", "--my xpath--", "my default").should == ["my default"]
end
end

describe "update_datastream_attributes" do
Expand Down
4 changes: 3 additions & 1 deletion spec/unit/nokogiri_datastream_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@
@mods_ds.update_indexed_attributes( { [{"fubar"=>"0"}]=>"the role" } ).should == {}
@mods_ds.to_xml.should == xml_before
end

it "should work with textile content" do
@mods_ds.update_indexed_attributes( {"abstract"=>{"0"=>"h2. Myfoo\n\n* bar\n* baz\n\n*bold!*"}} ).should == "foo"
end
### Examples copied over form metadata_datastream_spec

# it "should support single-value arguments (as opposed to a hash of values with array indexes as keys)" do
Expand Down

0 comments on commit bd1134f

Please sign in to comment.