Module: Plushie::Test
- Defined in:
- lib/plushie/test.rb,
lib/plushie/test/case.rb,
lib/plushie/test/rspec.rb,
lib/plushie/test/script.rb,
lib/plushie/test/helpers.rb,
lib/plushie/test/session.rb,
lib/plushie/test/snapshot.rb,
lib/plushie/test/session_pool.rb,
lib/plushie/test/script/runner.rb
Overview
Test framework for Plushie apps.
All testing goes through the renderer binary (no Ruby-side mocks). The mock backend is fast enough (~ms per interaction) for TDD.
Defined Under Namespace
Modules: Helpers, RSpec, Script, Snapshot Classes: Case, Session, SessionPool
Class Method Summary collapse
-
.backend ⇒ Symbol
:mock, :headless, or :windowed.
-
.pool ⇒ SessionPool
Get or create the shared session pool.
Class Method Details
.backend ⇒ Symbol
Returns :mock, :headless, or :windowed.
54 55 56 57 58 |
# File 'lib/plushie/test.rb', line 54 def self.backend env = ENV["PLUSHIE_TEST_BACKEND"] return env.to_sym if env && !env.empty? Plushie.configuration.test_backend || :mock end |
.pool ⇒ SessionPool
Get or create the shared session pool. Lazy-initialized on first access. Cleaned up at_exit.
47 48 49 50 51 |
# File 'lib/plushie/test.rb', line 47 def self.pool @pool_mutex.synchronize do @pool ||= create_pool end end |