Module: IntegrationTestKit
- Defined in:
- lib/integration_test_kit.rb,
lib/integration_test_kit/engine.rb,
lib/integration_test_kit/errors.rb,
lib/integration_test_kit/version.rb,
lib/integration_test_kit/registry.rb,
lib/integration_test_kit/configuration.rb,
app/helpers/integration_test_kit/application_helper.rb,
app/controllers/integration_test_kit/commands_controller.rb,
app/controllers/integration_test_kit/application_controller.rb
Defined Under Namespace
Modules: ApplicationHelper
Classes: ApplicationController, CommandsController, Configuration, Engine, EnvironmentError, Registry
Constant Summary
collapse
- VERSION =
'0.1.4'
Class Method Summary
collapse
Class Method Details
.commands ⇒ Object
9
10
11
|
# File 'lib/integration_test_kit.rb', line 9
def self.commands
@commands
end
|
.configuration ⇒ Object
13
14
15
|
# File 'lib/integration_test_kit.rb', line 13
def self.configuration
@configuration ||= Configuration.new
end
|
17
18
19
20
21
22
23
24
25
|
# File 'lib/integration_test_kit.rb', line 17
def self.configure
raise EnvironmentError unless Rails.env.test?
yield configuration
Dir[Rails.root.join(configuration.commands_load_path, '*.rb')].each do |file|
require File.expand_path(file)
end
end
|
.define(&block) ⇒ Object
35
36
37
38
|
# File 'lib/integration_test_kit.rb', line 35
def self.define(&block)
registry = Registry.new
registry.instance_eval(&block)
end
|
.run_command(name) ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/integration_test_kit.rb', line 27
def self.run_command(name)
raise EnvironmentError unless Rails.env.test?
@commands[name.to_sym].call
true
end
|