Top Level Namespace

Defined Under Namespace

Modules: Bacon, Ezamar, GetText, Kernel, MockHTTP, Ramaze, Requester, Sequel, WEBrick Classes: Array, Binding, BlankSlate, Browser, FalseClass, MOFile, MainController, Numeric, Object, OrderedSet, Proc, Should, SimpleHttp, String, Struct, Symbol, Thread, TrueClass

Constant Summary collapse

SPEC_REQUIRE_DEPENDENCY =
{
  'sequel' => %w[sqlite3 sequel_model sequel_core]
}
Traits =

Copyright © 2008 Michael Fellinger [email protected] All files in this distribution are subject to the terms of the Ruby license.

Hash.new{|h,k| h[k] = {}}

Instance Method Summary collapse

Instance Method Details

#ramaze(options = {}) ⇒ Object

Invoke ramaze with a set of default options suitable for testing. you may pass your options that will override the defaults.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ramaze/spec/helper.rb', line 14

def ramaze(options = {})
  options = {
    :adapter      => false,
    :run_loose    => true,
    :error_page   => false,
    :port         => 7007,
    :host         => '127.0.0.1',
    :force        => true,
    :sourcereload => false,
    :origin       => :spec,
  }.merge(options)

  Ramaze.start(options)
end

#spec_require(*following) ⇒ Object

require each of the following and rescue LoadError, telling you why it failed.



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ramaze/spec/helper.rb', line 34

def spec_require(*following)
  following << following.map{|f| SPEC_REQUIRE_DEPENDENCY[f] }
  following.flatten.uniq.compact.reverse.each do |file|
    require file.to_s
  end
rescue LoadError => ex
  puts ex
  puts "Can't run #{$0}: #{ex}"
  puts "Usually you should not worry about this failure, just install the"
  puts "library and try again (if you want to use that feature later on)"
  exit
end