Skip to content

Commit 11b18be

Browse files
committed
Use if statement instead of return in shoulda test
1 parent 8f18c7d commit 11b18be

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

test/functional/db_test.rb

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,18 @@ def test_db_stats
319319
end
320320

321321
should "return profiling info" do
322-
return unless @@version >= "2.2"
323-
@db.profiling_level = :all
324-
@coll.find()
325-
@db.profiling_level = :off
326-
327-
info = @db.profiling_info
328-
assert_kind_of Array, info
329-
assert info.length >= 1
330-
first = info.first
331-
assert_kind_of Time, first['ts']
332-
assert_kind_of Numeric, first['millis']
322+
if @@version >= "2.2"
323+
@db.profiling_level = :all
324+
@coll.find()
325+
@db.profiling_level = :off
326+
327+
info = @db.profiling_info
328+
assert_kind_of Array, info
329+
assert info.length >= 1
330+
first = info.first
331+
assert_kind_of Time, first['ts']
332+
assert_kind_of Numeric, first['millis']
333+
end
333334
end
334335

335336
should "validate collection" do

0 commit comments

Comments
 (0)