Skip to content

Commit

Permalink
make values exist before trying to remove them
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Nov 29, 2012
1 parent 9e58d4a commit 2dcfaac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion neography.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_development_dependency "rspec", ">= 2.0"
s.add_development_dependency "rspec", ">= 2.11"
s.add_development_dependency "net-http-spy", "0.2.1"
s.add_development_dependency "rake", ">= 0.8.7"
s.add_dependency "httparty", ">= 0.8.1"
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module Neography
:password => nil,
:parser => { :parser => MultiJsonParser }
}
subject.to_hash.should == expected_hash
config.to_hash.should == expected_hash
end

end
Expand Down
4 changes: 4 additions & 0 deletions spec/unit/properties_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ module Neography

it "resets properties as accessor" do
@db.should_receive(:"remove_node_properties").with(42, ["key"])
node.key = "value"
node.key = nil
end

it "resets properties as array entry" do
@db.should_receive(:"remove_node_properties").with(42, ["key"])
node["key"] = "value"
node["key"] = nil
end

Expand Down Expand Up @@ -104,11 +106,13 @@ module Neography

it "resets properties as accessor" do
@db.should_receive(:"remove_relationship_properties").with(42, ["key"])
relationship.key = "value"
relationship.key = nil
end

it "resets properties as array entry" do
@db.should_receive(:"remove_relationship_properties").with(42, ["key"])
relationship["key"] = "value"
relationship["key"] = nil
end

Expand Down

0 comments on commit 2dcfaac

Please sign in to comment.