Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added teardown method for adapters gom-15: Handle missing setup.
- Loading branch information
Philipp Brüll
committed
Feb 17, 2011
1 parent
8e964ba
commit 0f50306
Showing
13 changed files
with
140 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
shared_examples_for "an adapter that needs setup" do | ||
|
||
before :each do | ||
GOM::Storage.teardown | ||
end | ||
|
||
describe "fetching an object" do | ||
|
||
it "should raise a #{GOM::Storage::Adapter::NoSetupError}" do | ||
lambda do | ||
GOM::Storage.fetch "test_storage:object_1" | ||
end.should raise_error(GOM::Storage::Adapter::NoSetupError) | ||
end | ||
|
||
end | ||
|
||
describe "storing an object" do | ||
|
||
it "should raise a #{GOM::Storage::Adapter::NoSetupError}" do | ||
lambda do | ||
GOM::Storage.store :object | ||
end.should raise_error(GOM::Storage::Adapter::NoSetupError) | ||
end | ||
|
||
end | ||
|
||
describe "removing an object" do | ||
|
||
it "should raise a #{GOM::Storage::Adapter::NoSetupError}" do | ||
lambda do | ||
GOM::Storage.remove "test_storage:object_1" | ||
end.should raise_error(GOM::Storage::Adapter::NoSetupError) | ||
end | ||
|
||
end | ||
|
||
describe "fetching a class collection" do | ||
|
||
it "should raise a #{GOM::Storage::Adapter::NoSetupError}" do | ||
lambda do | ||
GOM::Storage.collection :test_storage, :test_object_class_view | ||
end.should raise_error(GOM::Storage::Adapter::NoSetupError) | ||
end | ||
|
||
end | ||
|
||
describe "fetching a map collection" do | ||
|
||
it "should raise a #{GOM::Storage::Adapter::NoSetupError}" do | ||
lambda do | ||
GOM::Storage.collection :test_storage, :test_map_view | ||
end.should raise_error(GOM::Storage::Adapter::NoSetupError) | ||
end | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters