spec/gitmodel/index_spec.rb in gitmodel-0.0.4 vs spec/gitmodel/index_spec.rb in gitmodel-0.0.5

- old
+ new

@@ -5,11 +5,11 @@ TestEntity.create!(:id => "foo", :attributes => {:x => 1, :y => 2}) TestEntity.create!(:id => "bar", :attributes => {:x => 1, :y => 3}) TestEntity.create!(:id => "baz", :attributes => {:x => 2, :y => 2}) @i = GitModel::Index.new(TestEntity) - @i.generate! + @i.generate!(GitModel.default_branch) end it "has a hash for each attribute of the model" do @i.attr_index(:x).should be_a(Hash) end @@ -21,10 +21,10 @@ end it "can regenerate itself" do @i.attr_index(:x).clear @i.attr_index(:x).should be_empty - @i.generate! + @i.generate!(GitModel.default_branch) @i.attr_index(:x).should == {1 => SortedSet.new(["foo", "bar"]), 2 => SortedSet.new(["baz"])} end it "knows it's filename" do @i.filename.should == "test_entities/_indexes.json"