class Object

Public Instance Methods

assert_contains(th) click to toggle source
# File lib/testoaster.rb, line 31
def assert_contains th
  b = @response.body
  if b =~ /#{Regexp.quote(th)}/
    assert true
  else
    assert false
  end
end
assert_layout(layout) click to toggle source
# File lib/testoaster.rb, line 15
def assert_layout layout
  assert_equal layout, @response.layout
end
puts!(arg, label="") click to toggle source
# File lib/testoaster.rb, line 4
def puts! arg, label=""
  puts "+++ +++ #{label}"
  puts arg.inspect
end
t(which, addr = 'config/locales/en.yml') click to toggle source
# File lib/testoaster.rb, line 19
def t which, addr = 'config/locales/en.yml'
  file = YAML::load(File.open(addr))
  file = file["en"]
  
  arr = which.split('.')
  arr.each do |a|
    file = file[a]
  end
  
  file
end