Top Level Namespace

Defined Under Namespace

Modules: RTM, Superiseable Classes: Float, String

Instance Method Summary

Instance Method Details

- (Boolean) ar_available?

Returns:

  • (Boolean)


26
27
28
# File 'rtm/spec/spec_helper.rb', line 26

def ar_available?
  !Gem.source_index.find_name('activerecord').empty?
end

- (Object) get_used_tm_sys



12
13
14
# File 'rtm/spec/spec_helper.rb', line 12

def get_used_tm_sys
  RTM.connect(:implementation => implementation_for_spec)
end

- (Object) get_used_tm_sys_tm



16
17
18
19
20
21
22
23
24
# File 'rtm/spec/spec_helper.rb', line 16

def get_used_tm_sys_tm
  @basis = get_used_tm_sys
  tm = @basis.create("http://www.topicmapslab.de/")
  if (implementation_for_spec == :hatana)
    tm.merge_in(RTM.connect(:implementation => :ontopia).create("http://www.topicmapslab.de/"))
  end
# tm.enable_query_cache
  return tm
end

- (Object) implementation_for_spec



9
10
11
# File 'rtm/spec/spec_helper.rb', line 9

def implementation_for_spec
  engine = ENV['RTM_IMPLEMENTATION'] && ENV['RTM_IMPLEMENTATION'].to_sym || :ontopia # if env is nil, the "normal progress will go on" # TODO: remove ontopia, as it should be chosen by connect by default
end

- (Object) no_output

Executes the given block while suppressing all standard output.



5
6
7
8
9
10
# File 'rtm/lib/rtm/helpers/no_output.rb', line 5

def no_output
  $stdout = File.open( PLATFORM =~ /mswin/ ? "NUL" : "/dev/null", "w" )
  yield if block_given?
  $stdout.close
  $stdout = STDOUT
end