Module: TestDsl::ClassMethods

### Home Classes Methods

### In Files

- lib/debugger/test/test_dsl.rb

### Methods

- #temporary_change_hash_value
- #temporary_change_method_value
- #temporary_set_const

### Included Modules

- TestDsl::Shared

### 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.

# TestDsl::ClassMethods

### Public Instance Methods

temporary_change_hash_value(item, key, value) click to toggle source

    # File lib/debugger/test/test_dsl.rb, line 198
    def temporary_change_hash_value(item, key, value)
      old_value = nil
      before do
        old_value = item[key]
        item[key] = value
      end
      after do
        item[key] = old_value
      end
    end

temporary_change_method_value(item, method, value) click to toggle source

    # File lib/debugger/test/test_dsl.rb, line 187
    def temporary_change_method_value(item, method, value)
      old_value = nil
      before do
        old_value = item.send(method)
        item.send("#{method}=", value)
      end
      after do
        item.send("#{method}=", old_value)
      end
    end

temporary_set_const(klass, const, value) click to toggle source

    # File lib/debugger/test/test_dsl.rb, line 209
    def temporary_set_const(klass, const, value)
      old_value = nil
      before do
        old_value = klass.const_defined?(const) ? klass.const_get(const) : :__undefined__
        force_set_const(klass, const, value)
      end
      after do
        if old_value == :__undefined__
          klass.send(:remove_const, const)
        else
          force_set_const(klass, const, old_value)
        end
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.