Class: RedisStoreTesting

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/redis-store/testing/tasks.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir = nil) ⇒ RedisStoreTesting

Returns a new instance of RedisStoreTesting.



15
16
17
18
# File 'lib/redis-store/testing/tasks.rb', line 15

def initialize(dir = nil)
  @dir    = Pathname.new(dir ||= Dir.pwd).realpath
  @runner = RedisReplicationRunner.new(@dir)
end

Class Method Details

.install_tasks(options = {}) ⇒ Object



11
12
13
# File 'lib/redis-store/testing/tasks.rb', line 11

def self.install_tasks(options = {})
  new(options[:dir]).install
end

Instance Method Details

#installObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/redis-store/testing/tasks.rb', line 20

def install
  namespace :redis do
    redis_about
    redis_install
    redis_make
    redis_download

    namespace :test do
      redis_test_suite
      redis_test_run
      redis_test_prepare
    end

    namespace :replication do
      redis_replication_start
      redis_replication_stop
      redis_replication_console
    end
  end

  task default: 'redis:test:suite'
end