Module: Wrong

Extended by:
Assert, Helpers
Includes:
Assert, Helpers
Included in:
MiniTest::Unit::TestCase, Test::Unit::TestCase
Defined in:
lib/wrong.rb,
lib/wrong/d.rb,
lib/wrong/chunk.rb,
lib/wrong/assert.rb,
lib/wrong/config.rb,
lib/wrong/helpers.rb,
lib/wrong/version.rb,
lib/wrong/close_to.rb,
lib/wrong/failure_message.rb,
lib/wrong/message/array_diff.rb,
lib/wrong/message/test_context.rb,
lib/wrong/message/string_comparison.rb

Defined Under Namespace

Modules: Assert, CloseTo, D, Helpers Classes: ArrayDiff, Chunk, Config, FailureMessage, StringComparison, StringComparisonFormatter

Constant Summary collapse

VERSION =
"0.4.1"

Class Method Summary collapse

Methods included from Assert

assert, deny, failure_class, failure_message, summary

Methods included from Helpers

capturing, rescuing

Class Method Details

.configObject



13
14
15
# File 'lib/wrong/config.rb', line 13

def self.config
  @config ||= load_config
end

.config=(new_config) ⇒ Object



17
18
19
# File 'lib/wrong/config.rb', line 17

def self.config=(new_config)
  @config = load_config
end

.load_configObject



4
5
6
7
8
9
10
11
# File 'lib/wrong/config.rb', line 4

def self.load_config
  settings = begin
    Chunk.read_here_or_higher(".wrong")
  rescue Errno::ENOENT => e
    # couldn't find it
  end
  Config.new settings
end