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
|