Skip to content

Commit

Permalink
Keep the specs alphabetical
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Sep 23, 2009
1 parent a79706e commit 24c6bc5
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions spec/unit/mongoid/document_spec.rb
Expand Up @@ -64,28 +64,6 @@

end

describe "#index" do

context "when unique options are not provided" do

it "delegates to collection with unique => false" do
@collection.expects(:create_index).with(:title, :unique => false)
Person.index :title
end

end

context "when unique option is provided" do

it "delegates to collection with unique option" do
@collection.expects(:create_index).with(:title, :unique => true)
Person.index :title, :unique => true
end

end

end

describe "#destroy" do

context "when the Document is remove from the database" do
Expand Down Expand Up @@ -308,6 +286,28 @@

end

describe "#index" do

context "when unique options are not provided" do

it "delegates to collection with unique => false" do
@collection.expects(:create_index).with(:title, :unique => false)
Person.index :title
end

end

context "when unique option is provided" do

it "delegates to collection with unique option" do
@collection.expects(:create_index).with(:title, :unique => true)
Person.index :title, :unique => true
end

end

end

describe "#new" do

context "with no attributes" do
Expand Down

0 comments on commit 24c6bc5

Please sign in to comment.