Module: Yabeda::RSpec

Defined in:
lib/yabeda/rspec.rb,
lib/yabeda/rspec/base_matcher.rb,
lib/yabeda/rspec/update_yabeda_gauge.rb,
lib/yabeda/rspec/observe_yabeda_summary.rb,
lib/yabeda/rspec/increment_yabeda_counter.rb,
lib/yabeda/rspec/measure_yabeda_histogram.rb

Overview

RSpec integration for Yabeda: custom matchers, etc

Defined Under Namespace

Classes: BaseMatcher, IncrementYabedaCounter, MeasureYabedaHistogram, ObserveYabedaSummary, UpdateYabedaGauge

Instance Method Summary collapse

Instance Method Details

#increment_yabeda_counter(metric) ⇒ Yabeda::RSpec::IncrementYabedaCounter

Checks whether Yabeda counter was incremented during test run or not

Parameters:

Returns:



10
11
12
# File 'lib/yabeda/rspec/increment_yabeda_counter.rb', line 10

def increment_yabeda_counter(metric)
  IncrementYabedaCounter.new(metric)
end

#measure_yabeda_histogram(metric) ⇒ Yabeda::RSpec::MeasureYabedaHistogram

Checks whether Yabeda histogram was measured during test run or not

Parameters:

Returns:



10
11
12
# File 'lib/yabeda/rspec/measure_yabeda_histogram.rb', line 10

def measure_yabeda_histogram(metric)
  MeasureYabedaHistogram.new(metric)
end

#observe_yabeda_summary(metric) ⇒ Yabeda::RSpec::ObserveYabedaSummary

Checks whether Yabeda summary was observed during test run or not

Parameters:

Returns:



10
11
12
# File 'lib/yabeda/rspec/observe_yabeda_summary.rb', line 10

def observe_yabeda_summary(metric)
  ObserveYabedaSummary.new(metric)
end

#update_yabeda_gauge(metric) ⇒ Yabeda::RSpec::UpdateYabedaGauge

Checks whether Yabeda gauge was set to some value during test run or not

Parameters:

  • metric (Yabeda::Gauge, String, Symbol)

    metric instance or name

Returns:



10
11
12
# File 'lib/yabeda/rspec/update_yabeda_gauge.rb', line 10

def update_yabeda_gauge(metric)
  UpdateYabedaGauge.new(metric)
end