Module: Tap::Test::TapTest
- Defined in:
- lib/tap/test/tap_test.rb
Overview
Sets up and tears down Tap::App.instance. This prevents tests that modify either from inadvertently conflicting with one another.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
The test specific app.
Instance Method Summary collapse
Instance Attribute Details
#app ⇒ Object (readonly)
The test specific app
11 12 13 |
# File 'lib/tap/test/tap_test.rb', line 11 def app @app end |
Instance Method Details
#app_config ⇒ Object
22 23 24 |
# File 'lib/tap/test/tap_test.rb', line 22 def app_config {:debug => true, :quiet => true, :env => Tap::Env.new(env_config)} end |
#env_config ⇒ Object
18 19 20 |
# File 'lib/tap/test/tap_test.rb', line 18 def env_config {:gems => :none, :root => @method_root || Dir.pwd} end |
#setup ⇒ Object
13 14 15 16 |
# File 'lib/tap/test/tap_test.rb', line 13 def setup super Tap::App.instance = @app = Tap::App.new(app_config) end |
#teardown ⇒ Object
26 27 28 29 |
# File 'lib/tap/test/tap_test.rb', line 26 def teardown Tap::App.instance = nil super end |