Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Jun 9, 2011
1 parent 0ab346d commit 1ea1475
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/pairtree/pairtree_encoding_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'Pairtree'
require 'pairtree'

describe "Pairtree encoding" do

Expand Down
19 changes: 19 additions & 0 deletions spec/pairtree/pairtree_root_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'pairtree'

describe "Pairtree::Root" do

before(:all) do
@pairtree = Pairtree::Client.new(File.join(File.dirname(__FILE__), "../test_data"))
@root = @pairtree.root
end

it "should have the correct prefix" do
@pairtree.prefix.should == 'pfx:'
end

it "should list identifiers" do
@root.list.should == ['pfx:abc123def']
end

end
2 changes: 1 addition & 1 deletion spec/test_data/pairtree_prefix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
druid:
pfx:

0 comments on commit 1ea1475

Please sign in to comment.