Permalink
Browse files

Fix all the ruby warnings when VERBOSE set to true.

  • Loading branch information...
1 parent 96989ef commit 8f7000f4481a854810ac714e8257227305df5abb @cyx cyx committed Jul 24, 2012
Showing with 8 additions and 8 deletions.
  1. +5 −5 test/filtering.rb
  2. +1 −1 test/helper.rb
  3. +1 −1 test/model.rb
  4. +1 −1 test/validations.rb
View
@@ -52,7 +52,7 @@ class User < Ohm::Model
end
test "#except" do |john, jane|
- out = User.create(:status => "inactive", :lname => "Doe")
+ User.create(:status => "inactive", :lname => "Doe")
res = User.find(:lname => "Doe").except(:status => "inactive")
@@ -80,8 +80,8 @@ class User < Ohm::Model
end
test "#union" do |john, jane|
+ User.create(:status => "super", :lname => "Doe")
included = User.create(:status => "inactive", :lname => "Doe")
- excluded = User.create(:status => "super", :lname => "Doe")
res = User.find(:status => "active").union(:status => "inactive")
@@ -112,9 +112,9 @@ class Author < Ohm::Model
book1 = Book.create
book2 = Book.create
- auth1 = Author.create(:book => book1, :mood => "happy")
- auth2 = Author.create(:book => book1, :mood => "sad")
- auth3 = Author.create(:book => book2, :mood => "sad")
+ Author.create(:book => book1, :mood => "happy")
+ Author.create(:book => book1, :mood => "sad")
+ Author.create(:book => book2, :mood => "sad")
[book1, book2]
end
View
@@ -15,7 +15,7 @@ def silence_warnings
yield
ensure
$VERBOSE = original_verbose
-end
+end unless defined?(silence_warnings)
$VERBOSE = true
View
@@ -70,7 +70,7 @@ def _initialize_id
class Foo < Ohm::Model
end
- foo = Foo.create
+ Foo.create
end
test "counters are cleaned up during deletion" do
View
@@ -103,7 +103,7 @@ def event.validate
# An existing model with a valid name
scope do
setup do
- event = Event.create(:name => "original")
+ Event.create(:name => "original")
end
# That has the name changed

0 comments on commit 8f7000f

Please sign in to comment.