Sha256: cf29ac62ac7d992da46b2fdf349cc8b5ede4edc30dd616bb7bdacf4e9d49434a

Contents?: true

Size: 1.96 KB

Versions: 1

Compression:

Stored size: 1.96 KB

Contents

Feature: Index a document
  In order to make text searchable
  A document's contents should be indexed
  
  Background:
    Given hash includes indexer
  
  Scenario: Indexing
    Given a hash with
      | title   | Strabo's Geographica                                         |
      | author  | Strabo of Amaseia                                            |
      | summary | Strabo was born to an affluent family from Amaseia in Pontus |
    Then it should have the following "title" term frequencies:
      | term         | frequency |
      | geographica  | 1         |
    Then it should have the following "author" term frequencies:
      | term         | frequency |
      | strabo       | 1         |
      | of           | 1         |
      | amaseia      | 1         |
    Then it should have the following "summary" term frequencies:
      | term         | frequency |
      | strabo       | 1         |
      | was          | 1         |
      | born         | 1         |
      | to           | 1         |
      | an           | 1         |
      | affluent     | 1         |
    Then it should have the following term frequencies:
      | term         | frequency |
      | strabo       | 2         |
      | amaseia      | 2         |
      | geographica  | 1         |
  
  Scenario: Abstract indexing
    Given a hash with
      | foo   | x y x y x y |
      | bar   | x y z x y z |
      | baz   | a b c x y z |
    Then it should have the following "foo" term frequencies:
      | T | F |
      | x | 3 |
      | x | 3 |
    Then it should have the following "bar" term frequencies:
      | T | F |
      | x | 2 |
      | y | 2 |
      | z | 2 |
    Then it should have the following "baz" term frequencies:
      | T | F |
      | x | 1 |
      | y | 1 |
      | z | 1 |
      | a | 1 |
      | b | 1 |
      | c | 1 |
    Then it should have the following term frequencies:
      | T | F |
      | x | 6 |
      | y | 6 |
      | z | 3 |
      | a | 1 |
      | b | 1 |
      | c | 1 |

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strabo-0.0.0 features/index.feature