Module: MiniTest::Assertions

### Home Classes Methods

### In Files

- lib/debugger/test/matchers.rb

### Methods

- #assert_includes_in_order
- #refute_includes_in_order

### Class/Module Index

Quicksearch

- Debugger
- Debugger::AddBreakpoint
- Debugger::Breakpoint
- Debugger::Context
- Debugger::ContinueCommand
- Debugger::DeleteBreakpointCommand
- Debugger::FinishCommand
- Debugger::HelpCommand
- Debugger::IRBCommand
- Debugger::InfoCommand
- Debugger::JumpCommand
- Debugger::KillCommand
- Debugger::ListCommand
- Debugger::LocalInterface
- Debugger::LocalInterface::Debugger
- Debugger::MethodCommand
- Debugger::MethodSigCommand
- Debugger::NextCommand
- Debugger::ParseFunctions
- Debugger::Processor
- Debugger::QuitCommand
- Debugger::ReloadCommand
- Debugger::SetCommand
- Debugger::ShowCommand
- Debugger::SkipCommand
- Debugger::SourceCommand
- Debugger::StepCommand
- Debugger::VarClassVarCommand
- Debugger::VarInheritCommand
- Debugger::VarLocalCommand
- Debugger::WhereCommand
- Printers
- Printers::Base
- Printers::Base::MissedArgument
- Printers::Base::MissedPath
- Printers::Plain
- Mocha
- Mocha::Call
- Mocha::Expectation
- Mocha::Mock
- MiniTest
- MiniTest::Assertions
- MiniTest::Expectations
- TestDsl
- TestDsl::ClassMethods
- TestDsl::Shared
- Kernel
- Module
- PrinterHelpers
- TestInterface

No matching classes.

# MiniTest::Assertions

### Public Instance Methods

assert_includes_in_order(given_collection, original_collection, msg = nil) click to toggle source

This matcher checks that given collection is included into the original collection, and in correct order. It accepts both strings and regexps.

Examples:

    assert_includes_in_order(%w{1 2 3 4 5}, %w{1 3 5})            # => pass
    assert_includes_in_order(%w{1 2 3 4 5}, %w{1 5 3})            # => fail
    assert_includes_in_order(w{1 2 3 4 5}, ["1", /\d+/, "5"])     # => pass
    assert_includes_in_order(w{1 2 3 4 5}, ["1", /\[a-z]+/, "5"]) # => fail

    # File lib/debugger/test/matchers.rb, line 13
    def assert_includes_in_order(given_collection, original_collection, msg = nil)
      msg = message(msg) do
        "Expected #{mu_pp(original_collection)} to include #{mu_pp(given_collection)} in order"
      end
      assert includes_in_order_result(original_collection, given_collection), msg
    end

refute_includes_in_order(given_collection, original_collection, msg = nil) click to toggle source

    # File lib/debugger/test/matchers.rb, line 20
    def refute_includes_in_order(given_collection, original_collection, msg = nil)
      msg = message(msg) do
        "Expected #{mu_pp(original_collection)} to not include #{mu_pp(given_collection)} in order"
      end
      refute includes_in_order_result(original_collection, given_collection), msg
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.