Top Level Namespace
Defined Under Namespace
Modules: Utils
Classes: Testoaster
Instance Method Summary
collapse
Instance Method Details
#assert_contains(th) ⇒ Object
31
32
33
34
35
36
37
38
|
# 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) ⇒ Object
15
16
17
|
# File 'lib/testoaster.rb', line 15
def assert_layout layout
assert_equal layout, @response.layout
end
|
#puts!(arg, label = "") ⇒ Object
4
5
6
7
|
# File 'lib/testoaster.rb', line 4
def puts! arg, label=""
puts "+++ +++ #{label}"
puts arg.inspect
end
|
#t(which, addr = 'config/locales/en.yml') ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# 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
|