Sha256: d00097b09e1f758433d54aec2baca5e917c8ae73e9ac3b5f95a0c32c15362988

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

Feature: Be testable in a single Ruby source

  In order to try Observed to see the basic usage usage of it,
  I want to configure and run Observed in just a single Ruby source file

  Scenario: Create a .rb file containing Observed code and run it with the ruby command
    Given a file named "test.rb" with:
    """
    require 'observed'

    include Observed

    class Test < Observed::Observer
      plugin_name 'test'
      def observe
        system.report(tag, {foo:1})
      end
    end

    observe 'foo', via: 'test'

    run 'foo'

    report /foo/, via: 'stdout'

    run 'foo'
    """
    When I run `ruby test.rb`
    Then the output should contain:
    """
    foo {:foo=>1}
    """

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
observed-0.1.1 features/test_in_single_ruby_source.feature