Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pseudo graphics #6

Merged
merged 3 commits into from Feb 19, 2018

Conversation

am-kantox
Copy link
Contributor

Adds a pseudographics to draw nifty table without damn spacing between dashes.

@hpopp
Copy link
Member

hpopp commented Feb 19, 2018

Love it. Can you update the style to match how its shown in the README? Current implementation has lines between every row.

@am-kantox
Copy link
Contributor Author

I am not sure I follow. If you are talking about spaces here, it’s github HTML linespacing, in console there are no spaces.

@hpopp
Copy link
Member

hpopp commented Feb 19, 2018

describe "pseudo" do
    test "outputs correct format" do
      t = %Scribe.StyleTest{}
      refute t.id
      assert t.value == 1234

      # Whitespace stripping breaks docstrings
      expected =
        "┌────────────────────┬───────┬──────────┐\n" <>
        "│ :__struct__        │ :id   │ :value   │\n" <>
        "├────────────────────┼───────┼──────────┤\n" <>
        "│ Scribe.StyleTest   │ nil   │ 1234     │\n" <>
        "├────────────────────┼───────┼──────────┤\n" <>
        "│ Scribe.StyleTest   │ nil   │ 1234     │\n" <>
        "├────────────────────┼───────┼──────────┤\n" <>
        "│ Scribe.StyleTest   │ nil   │ 1234     │\n" <>
        "└────────────────────┴───────┴──────────┘\n"

      opts = [colorize: false, style: Scribe.Style.Pseudo]
      actual = Scribe.format([t, t, t], opts)
      assert actual == expected
    end
  end

Should actually be testing for:

describe "pseudo" do
    test "outputs correct format" do
      t = %Scribe.StyleTest{}
      refute t.id
      assert t.value == 1234

      # Whitespace stripping breaks docstrings
      expected =
        "┌────────────────────┬───────┬──────────┐\n" <>
        "│ :__struct__        │ :id   │ :value   │\n" <>
        "├────────────────────┼───────┼──────────┤\n" <>
        "│ Scribe.StyleTest   │ nil   │ 1234     │\n" <>
        "│ Scribe.StyleTest   │ nil   │ 1234     │\n" <>
        "│ Scribe.StyleTest   │ nil   │ 1234     │\n" <>
        "└────────────────────┴───────┴──────────┘\n"

      opts = [colorize: false, style: Scribe.Style.Pseudo]
      actual = Scribe.format([t, t, t], opts)
      assert actual == expected
    end
  end

@am-kantox
Copy link
Contributor Author

Ah, indeed :)

Fixed.

@hpopp hpopp merged commit e73dfc8 into codedge-llc:master Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants