Skip to content

Instantly share code, notes, and snippets.

@benfoster
Created May 11, 2013 09:42
Show Gist options
  • Select an option

  • Save benfoster/5559456 to your computer and use it in GitHub Desktop.

Select an option

Save benfoster/5559456 to your computer and use it in GitHub Desktop.
NSpec Parameterised Specs?
void heading1_tag()
{
before = () => html = "<h1></h1>";
it["adds a paragraph with style 'Heading1'"] = ()
=> pdf.LastParagraph.Style.should_be("Heading1");
}
void heading2_tag()
{
before = () => html = "<h2></h2>";
it["adds a paragraph with style 'Heading2'"] = ()
=> pdf.LastParagraph.Style.should_be("Heading2");
}
void heading3_tag()
{
before = () => html = "<h3></h3>";
it["adds a paragraph with style 'Heading3'"] = ()
=> pdf.LastParagraph.Style.should_be("Heading3");
}
void heading4_tag()
{
before = () => html = "<h4></h4>";
it["adds a paragraph with style 'Heading4'"] = ()
=> pdf.LastParagraph.Style.should_be("Heading4");
}
void heading5_tag()
{
before = () => html = "<h5></h5>";
it["adds a paragraph with style 'Heading5'"] = ()
=> pdf.LastParagraph.Style.should_be("Heading5");
}
void heading6_tag()
{
before = () => html = "<h6></h6>";
it["adds a paragraph with style 'Heading6'"] = ()
=> pdf.LastParagraph.Style.should_be("Heading6");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment