Sha256: 51357b6c355322ee3cf9d438a2401c16a462802a4c81db3cf28340e659441e56

Contents?: true

Size: 1017 Bytes

Versions: 2

Compression:

Stored size: 1017 Bytes

Contents

Feature: Levenshtein similarity algorithm

  Scenario: iterate simlar_articles
    Given a fixture app "test-app"
    And a file named "config.rb" with:
      """
      activate :blog do|blog|
        blog.layout = "article"
      end
      activate :similar, :algorithm => :levenshtein
      """
    Given the Server is running at "test-app"
    When I go to "/2014/05/08/article0.html"
    Then I should see "<h1>Article 0</h1>"
    Then I should see '<blockquote class="algorithm">Middleman::Blog::Similar::Algorithm::Levenshtein</blockquote>'
    Then I should see '<li class="a0"><a href="/2014/05/13/article5.html">Article 5</a></li>'
    Then I should see '<li class="a1"><a href="/2014/05/09/article1.html">Article 1</a></li>'
    Then I should see '<li class="a2"><a href="/2014/05/12/article4.html">Article 4</a></li>'
    Then I should see '<li class="a3"><a href="/2014/05/14/article6.html">Article 6</a></li>'
    Then I should see '<li class="a4"><a href="/2014/05/10/article2.html">Article 2</a></li>'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
middleman-blog-similar-1.1.1 features/levenshtein.feature
middleman-blog-similar-1.1.0 features/levenshtein.feature