active-fedora 4.0.0.rc1 → 4.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/Gemfile.lock +2 -11
  2. data/History.txt +4 -1
  3. data/active-fedora.gemspec +2 -2
  4. data/lib/active_fedora/associations/association_collection.rb +1 -1
  5. data/lib/active_fedora/associations/belongs_to_association.rb +1 -1
  6. data/lib/active_fedora/associations/has_and_belongs_to_many_association.rb +1 -1
  7. data/lib/active_fedora/base.rb +10 -6
  8. data/lib/active_fedora/file_management.rb +1 -1
  9. data/lib/active_fedora/fixture_loader.rb +1 -1
  10. data/lib/active_fedora/model.rb +39 -38
  11. data/lib/active_fedora/nokogiri_datastream.rb +1 -1
  12. data/lib/active_fedora/persistence.rb +9 -11
  13. data/lib/active_fedora/predicates.rb +2 -2
  14. data/lib/active_fedora/rdf_datastream.rb +49 -7
  15. data/lib/active_fedora/relationships.rb +6 -9
  16. data/lib/active_fedora/service_definitions.rb +1 -1
  17. data/lib/active_fedora/solr_service.rb +15 -8
  18. data/lib/active_fedora/version.rb +1 -1
  19. data/lib/tasks/active_fedora.rake +3 -5
  20. data/lib/tasks/active_fedora_dev.rake +2 -1
  21. data/spec/fixtures/solr_rdf_descMetadata.nt +7 -0
  22. data/spec/integration/base_file_management_spec.rb +1 -1
  23. data/spec/integration/base_find_by_fields_spec.rb +16 -14
  24. data/spec/integration/base_spec.rb +10 -9
  25. data/spec/integration/datastream_collections_spec.rb +5 -5
  26. data/spec/integration/datastream_spec.rb +1 -1
  27. data/spec/integration/full_featured_model_spec.rb +1 -1
  28. data/spec/integration/model_spec.rb +14 -11
  29. data/spec/integration/mods_article_integration_spec.rb +2 -2
  30. data/spec/integration/nokogiri_datastream_spec.rb +1 -1
  31. data/spec/integration/ntriples_datastream_spec.rb +1 -0
  32. data/spec/integration/rels_ext_datastream_spec.rb +5 -6
  33. data/spec/integration/semantic_node_spec.rb +0 -1
  34. data/spec/integration/solr_service_spec.rb +8 -8
  35. data/spec/unit/base_extra_spec.rb +47 -7
  36. data/spec/unit/base_file_management_spec.rb +1 -1
  37. data/spec/unit/base_spec.rb +44 -15
  38. data/spec/unit/model_spec.rb +16 -29
  39. data/spec/unit/ntriples_datastream_spec.rb +152 -1
  40. data/spec/unit/relationships_spec.rb +16 -18
  41. data/spec/unit/solr_config_options_spec.rb +1 -3
  42. data/spec/unit/solr_service_spec.rb +12 -24
  43. metadata +68 -86
  44. data/spec/integration/base_loader_spec.rb +0 -40
@@ -1,40 +0,0 @@
1
- require 'spec_helper'
2
- require 'active_fedora'
3
- require 'active_fedora/base'
4
- require 'active_fedora/metadata_datastream'
5
- require 'nokogiri'
6
-
7
- # Load Sample OralHistory Model
8
- require File.join( File.dirname(__FILE__), "..","samples","oral_history_sample_model" )
9
-
10
-
11
- describe ActiveFedora::Base do
12
-
13
- before(:all) do
14
- ActiveFedora::SolrService.register(ActiveFedora.solr_config[:url])
15
- end
16
-
17
- before(:each) do
18
- @test_object = OralHistorySampleModel.new
19
- @test_object.save
20
- end
21
-
22
- after(:each) do
23
- @test_object.delete
24
- end
25
-
26
- describe "load_instance" do
27
- it "should retain all datastream attributes pulled from fedora" do
28
- raw_object = ActiveFedora::Base.find(@test_object.pid)
29
- loaded = OralHistorySampleModel.load_instance(@test_object.pid)
30
- raw_datastreams = raw_object.datastreams
31
- loaded_datastreams = loaded.datastreams
32
- raw_datastreams.each_pair do |k,v|
33
- v.dsid.should == loaded_datastreams[k].dsid
34
- v.dsLabel.should == loaded_datastreams[k].dsLabel
35
- v.mimeType.should == loaded_datastreams[k].mimeType
36
- end
37
- end
38
- end
39
-
40
- end