File: helper_test.rb

package info (click to toggle)
ruby-riot 0.12.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 512 kB
  • sloc: ruby: 2,557; 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