File: helper_test.rb

package info (click to toggle)
ruby-riot 0.12.7-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 496 kB
  • ctags: 319
  • sloc: ruby: 2,572; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
require 'teststrap'

context "A context with a helper" do
  setup { "foo" }

  helper(:upcase) { topic.upcase }
  helper(:append) {|str| topic + str }

  asserts("executing the helper") { upcase }.equals("FOO")
  asserts("calling a helper with an argument") { append("bar") }.equals("foobar")
end