---
name: "convert_to_should_syntax"
section: "1"
platform: "linux"
package: "ruby-shoulda-context"
version: "2.0.0-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/convert_to_should_syntax"
---

# convert\_to\_should\_syntax(1)

converts a regular Test::Unit Ruby source file into one that uses shoulda syntax.

## NAME

convert\_to\_shoulda\_syntax - converts a regular Test::Unit Ruby source file into one that uses shoulda syntax.

## SYNOPSIS

**convert\_to\_shoulda\_syntax** *normal\_test\_file.rb*

## DESCRIPTION

converts a unit test file using regular Test::Unit syntax to one using the nicer shoulda syntax, i.e. it will convert an existing test file with names like

-

  def test\_should\_do\_stuff

-

  ...

-

  end

to one using the new syntax:

-

  should "be super cool" do

-

  ...

-

  end

A copy of the old file will be left under /tmp/ in case this script just seriously screws up.

## SEE ALSO

/usr/share/doc/libshoulda-ruby/ as installed by the libshoulda-ruby package for documentation of should itself.

## ABOUT

This manual page was written by Antonio Terceiro \<terceiro@softwarelivre.org\> for the Debian GNU/Linux system, but may be used by others. It was based on convert\_to\_shoulda\_syntax's help output, i.e., when called without proper arguments, and with the help of help2man.
