Module: Wrong

Extended by:
Assert, Helpers
Includes:
Assert, Helpers
Included in:
RSpec::Core::ExampleGroup, 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/rescuing.rb,
lib/wrong/terminal.rb,
lib/wrong/capturing.rb,
lib/wrong/eventually.rb,
lib/wrong/failure_message.rb,
lib/wrong/message/array_diff.rb,
lib/wrong/message/test_context.rb,
lib/wrong/message/string_comparison.rb,
lib/wrong/adapters/rspec.rb,
lib/wrong/adapters/rspec.rb

Overview

Disallow alias_assert :expect

Defined Under Namespace

Modules: Assert, Capturing, CloseTo, D, Eventually, Helpers, Rescuing Classes: ArrayDiff, Chunk, Config, FailureMessage, StringComparison, StringComparisonFormatter, Terminal

Constant Summary collapse

VERSION =
"0.7.1"

Constants included from Eventually

Eventually::NO_BLOCK_PASSED

Class Method Summary collapse

Methods included from Assert

assert, deny, failure_class, failure_message, increment_assertion_count

Methods included from D

#d

Methods included from CloseTo

#close_to?

Methods included from Eventually

#eventually

Methods included from Capturing

#capturing

Methods included from Rescuing

#rescuing

Class Method Details

.configObject



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

def self.config
  @config ||= load_config
end

.config=(new_config) ⇒ Object



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

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

.load_configObject



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

def self.load_config
  settings = begin
    Config.read_here_or_higher(".wrong")
  rescue Errno::ENOENT => e
    # couldn't find it
    nil # In Ruby 1.8, "e" would be returned here otherwise
  end
  Config.new settings
end