Skip to content

Commit

Permalink
Add Graphiti.database
Browse files Browse the repository at this point in the history
This method returns the underlying Ashikawa::Core::Database object.
  • Loading branch information
sleepycat committed Jan 14, 2015
1 parent 7117322 commit cd1e04b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/graphiti.rb
Expand Up @@ -23,6 +23,10 @@ def self.configure opt
true
end

def self.database
@@db
end

def self.config
@@config
end
Expand Down
8 changes: 8 additions & 0 deletions spec/graphiti_spec.rb
Expand Up @@ -56,6 +56,14 @@

end

describe ".database" do

it "returns the underlying database object" do
expect(Graphiti.database).to be_a Ashikawa::Core::Database
end

end

before(:all) do
options = {
url: "http://127.0.0.1:8529",
Expand Down

0 comments on commit cd1e04b

Please sign in to comment.