Skip to content

Commit

Permalink
Replace setup and teardown with around and a block.
Browse files Browse the repository at this point in the history
  • Loading branch information
norman committed Dec 15, 2014
1 parent f394e38 commit 16980d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions default_value_for.gemspec
Expand Up @@ -17,4 +17,5 @@ Gem::Specification.new do |s|
s.add_dependency 'activerecord', '>= 3.2.0', '< 5.0'
s.add_development_dependency 'railties', '>= 3.2.0', '< 5.0'
s.add_development_dependency 'minitest', '>= 4.2'
s.add_development_dependency 'minitest-around'
end
7 changes: 3 additions & 4 deletions test.rb
Expand Up @@ -20,6 +20,7 @@

require 'bundler/setup'
require 'minitest/autorun'
require 'minitest/around/unit'
require 'active_record'
require 'active_support/dependencies'

Expand Down Expand Up @@ -71,11 +72,9 @@ class Number < ActiveRecord::Base
end

class DefaultValuePluginTest < TestCaseClass
def setup
def around
Number.create(:number => 9876)
end

def teardown
yield
Number.delete_all
end

Expand Down

0 comments on commit 16980d9

Please sign in to comment.