mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
Add tests for configuration API.
This commit is contained in:
parent
65f1d98868
commit
e81850b5cb
1 changed files with 21 additions and 0 deletions
21
test/test_config.rb
Normal file
21
test/test_config.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
require_relative 'helper'
|
||||
|
||||
class TestConfig < MiniTest::Unit::TestCase
|
||||
def setup
|
||||
@saved = Sidetiq.config
|
||||
Sidetiq.config = OpenStruct.new
|
||||
end
|
||||
|
||||
def teardown
|
||||
Sidetiq.config = @saved
|
||||
end
|
||||
|
||||
def test_configure
|
||||
Sidetiq.configure do |config|
|
||||
config.test = 42
|
||||
end
|
||||
|
||||
assert_equal 42, Sidetiq.config.test
|
||||
end
|
||||
end
|
||||
|
Loading…
Add table
Reference in a new issue