Skip to content

Instantly share code, notes, and snippets.

@samaaron
Created December 24, 2009 12:04
Show Gist options
  • Save samaaron/263163 to your computer and use it in GitHub Desktop.
Save samaaron/263163 to your computer and use it in GitHub Desktop.
.
|-- README
|-- lib
| |-- iktex
| | `-- translator.ik
| `-- iktex.ik
`-- test
|-- ispec_helper.ik
`-- unit
|-- iktex_spec.ik
`-- translator_spec.ik
IkTeX = Origin mimic
use("iktex/translator")
use(System currentDirectory + "/../ispec_helper.ik")
describe(IkTeX,
it("should have the correct kind",
IkTeX should have kind("IkTeX")))
System loadPath << System currentDirectory + "/../lib/"
use("iktex")
use("ispec")
IkTeX Translator = Origin mimic do(
initialize = method("initialize a new IkTex translater with a given text source",
source,
@source = source
)
translate = method("translate the source into LaTeX",
@source
)
)
use(System currentDirectory + "/../ispec_helper.ik")
describe(IkTeX Translator,
it("should have the correct kind",
IkTeX Translator should have kind("IkTeX Translator"))
describe("mimic",
it("should be possible to mimic a new IkTeX with a given piece of text",
t = IkTeX Translator mimic("text")
t should have kind("IkTeX Translator")
)
)
describe("source",
it("should be possible to retrieve the original source of text to be translated",
t = IkTeX Translator mimic("original source")
t source should == "original source"
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment