Sha256: c34c16ec80ba0ad26748d9afd5b33bc05c4bb17b0f9c178088b3e216bfb85629

Contents?: true

Size: 1.75 KB

Versions: 8

Compression:

Stored size: 1.75 KB

Contents

Feature: Update
  I want to run a few judges over a factbase

  Scenario: Simple run of a few judges
    Given I make a temp directory
    Then I have a "simple/simple_judge.rb" file with content:
    """
      n = $fb.insert
      n.kind = 'yes!'
    """
    Then I run bin/judges with "--verbose update --quiet -o foo=1 -o bar=2 --max-cycles 3 . simple.fb"
    Then Stdout contains "FOO → "
    Then Stdout contains "BAR → "
    Then Stdout contains "1 judge(s) processed"
    Then Stdout contains "Update finished in 3 cycle(s), modified 3/0 fact(s)"
    And Exit code is zero

  Scenario: Simple run of a few judges, with a lib
    Given I make a temp directory
    Then I have a "mine/judge1/simple_judge.rb" file with content:
    """
      $valve.enter('boom') do
        n = $fb.insert
        n.foo = $foo
      end
    """
    Then I have a "mylib/foo.rb" file with content:
    """
      $foo = 42
    """
    Then I run bin/judges with "update --lib mylib --max-cycles 1 mine simple.fb"
    Then Stdout contains "1 judge(s) processed"
    Then Stdout contains "Update finished in 1 cycle(s)"
    And Exit code is zero

  Scenario: The update fails when a bug in a judge
    Given I make a temp directory
    Then I have a "mine/judge1/broken.rb" file with content:
    """
    a < 1
    """
    Then I run bin/judges with "update mine simple.fb"
    Then Stdout contains "Failed to update correctly"
    And Exit code is not zero

  Scenario: The update fails when a broken Ruby syntax in a judge
    Given I make a temp directory
    Then I have a "mine/judge1/broken.rb" file with content:
    """
    invalid$ruby$syntax$here
    """
    Then I run bin/judges with "update mine simple.fb"
    Then Stdout contains "Failed to update correctly"
    And Exit code is not zero

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
judges-0.15.5 features/update.feature
judges-0.15.4 features/update.feature
judges-0.15.3 features/update.feature
judges-0.15.2 features/update.feature
judges-0.15.1 features/update.feature
judges-0.15.0 features/update.feature
judges-0.14.0 features/update.feature
judges-0.13.3 features/update.feature