Module Protest
In: lib/protest.rb
lib/protest/utils/summaries.rb
lib/protest/utils/colorful_output.rb
lib/protest/utils/backtrace_filter.rb
lib/protest/tests.rb
lib/protest/runner.rb
lib/protest/reports/summary.rb
lib/protest/reports/turn.rb
lib/protest/reports/progress.rb
lib/protest/reports/documentation.rb
lib/protest/reports/stories.rb
lib/protest/reports/stories/pdf.rb
lib/protest/utils.rb
lib/protest/stories.rb
lib/protest/test_case.rb
lib/protest/report.rb

encoding: utf-8

Methods

Classes and Modules

Module Protest::Stories
Module Protest::TestWithErrors
Module Protest::Utils
Class Protest::AssertionFailed
Class Protest::ErroredTest
Class Protest::FailedTest
Class Protest::PassedTest
Class Protest::Pending
Class Protest::PendingTest
Class Protest::Report
Class Protest::Runner
Class Protest::Test
Class Protest::TestCase

Constants

VERSION = "0.4.2"

External Aliases

context -> describe
context -> story

Public Class methods

Register a new Report. This will make your report available to Protest, allowing you to run your tests through this report. For example

    module Protest
      class Reports::MyAwesomeReport < Report
      end

      add_report :awesomesauce, MyAwesomeReport
    end

See Protest.report_with to see how to select which report will be used.

Register a test case to be run with Protest. This is done automatically whenever you subclass Protest::TestCase, so you probably shouldn‘t pay much attention to this method.

Set to false to avoid running tests at_exit. Default is true.

Checks to see if tests should be run at_exit or not. Default is true. See Protest.autorun=

The object that filters the backtrace

Set what object will filter the backtrace. It must respond to filter_backtrace, taking a backtrace array and a prefix path.

Define a top level test context where to define tests. This works exactly the same as subclassing TestCase explicitly.

    Protest.context "A user" do
      ...
    end

is just syntax sugar to write:

    class TestUser < Protest::TestCase
      self.description = "A user"
      ...
    end

Load a report by name, initializing it with the extra arguments provided. If the given name doesn‘t match a report registered via Protest.add_report then the method will raise IndexError.

Select the name of the Report to use when running tests. See Protest.add_report for more information on registering a report.

Any extra arguments will be forwarded to the report‘s initialize method.

The default report is Protest::Reports::Progress

Run all registered test cases through the selected report. You can pass arguments to the Report constructor here.

See Protest.add_test_case and Protest.report_with

[Validate]