Class: Spec::Example::ExampleGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/sequel/spec/integration/spec_helper.rb,
lib/sequel/spec/integration/spec_helper.rb,
lib/sequel/spec/integration/spec_helper.rb,
lib/sequel/spec/adapters/spec_helper.rb

Overview

INTEGRATION_DB.instance_variable_set(:@server_version, 80100)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cspecify(message, *checked, &block) ⇒ Object


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/sequel/spec/integration/spec_helper.rb', line 29

def self.cspecify(message, *checked, &block)
  pending = false
  checked.each do |c|
    case c
    when INTEGRATION_DB.database_type
      pending = c
    when Array
      case c.length
      when 1
        pending = c if c.first == INTEGRATION_DB.class.adapter_scheme
      when 2
        if c.first.is_a?(Proc)
          pending = c if c.first.call(INTEGRATION_DB) && c.last == INTEGRATION_DB.database_type
        elsif c.last.is_a?(Proc)
          pending = c if c.first == INTEGRATION_DB.class.adapter_scheme && c.last.call(INTEGRATION_DB)
        else
          pending = c if c.first == INTEGRATION_DB.class.adapter_scheme && c.last == INTEGRATION_DB.database_type
        end
      when 3
        pending = c if c[0] == INTEGRATION_DB.class.adapter_scheme && c[1] == INTEGRATION_DB.database_type && c[2].call(INTEGRATION_DB)
      end          
    end
    break if pending
  end
  if pending
    specify(message){pending("Not yet working on #{Array(pending).join(', ')}", &block)}
  else
    specify(message, &block)
  end
end

Instance Method Details

#logObject


20
21
22
23
24
25
26
27
# File 'lib/sequel/spec/integration/spec_helper.rb', line 20

def log
  begin
    INTEGRATION_DB.loggers << Logger.new(STDOUT)
    yield
  ensure
   INTEGRATION_DB.loggers.pop
  end
end

#sqls_should_be(*sqls) ⇒ Object


68
69
# File 'lib/sequel/spec/integration/spec_helper.rb', line 68

def sqls_should_be(*args)
end