Skip to content

Commit

Permalink
Add Sneakers test and inline setup/teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed May 20, 2014
1 parent 34f0e42 commit 2d19c71
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/cases/adapter_test.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
require 'helper'

class AdapterTest < ActiveSupport::TestCase
def setup
@old_adapter = ActiveJob::Base.queue_adapter
end
setup { @old_adapter = ActiveJob::Base.queue_adapter }
teardown { ActiveJob::Base.queue_adapter = @old_adapter }

test 'should load inline adapter' do
ActiveJob::Base.queue_adapter = :inline
Expand Down Expand Up @@ -40,7 +39,8 @@ def setup
assert_equal ActiveJob::QueueAdapters::SuckerPunchAdapter, ActiveJob::Base.queue_adapter
end

def teardown
ActiveJob::Base.queue_adapter = @old_adapter
test 'should load Sneakers adapter' do
ActiveJob::Base.queue_adapter = :sneakers
assert_equal ActiveJob::QueueAdapters::SneakersAdapter, ActiveJob::Base.queue_adapter
end
end

0 comments on commit 2d19c71

Please sign in to comment.