module RSpec::Expectations

Constants

PWD

Attributes

current_expect[RW]
current_spec_line[RW]
last_expect[RW]
last_spec_line[RW]

Public Class Methods

expectation_count() click to toggle source
# File lib/rspec_expectation_count/rspec_expectation_count.rb, line 12
def expectation_count
  @expectation_count ||= 0
end
expectation_debug() click to toggle source
# File lib/rspec_expectation_count/expectation_debug.rb, line 5
def expectation_debug
  @expectation_debug ||= []
end
update_expectation_count() click to toggle source
# File lib/rspec_expectation_count/expectation_debug.rb, line 34
def update_expectation_count
  # if we've previously seen the expect and haven't advanced to the next spec line
  # then it's most likely a duplicate execution.
  return if (current_expect == last_expect) && (last_spec_line == current_spec_line)
  @expectation_count = expectation_count + 1
  update_expectation_debug
end
update_expectation_debug() click to toggle source
# File lib/rspec_expectation_count/expectation_debug.rb, line 42
def update_expectation_debug
  expectation_debug << current_expect
end