class RSpec::Bash::Mocks::Matchers::TestBy

@private

Public Class Methods

new(expr) click to toggle source
# File lib/rspec/bash/mocks/matchers/test_by.rb, line 10
def initialize(expr)
  @double = Doubles::ConditionalDouble.new(expr)
  @display_name = "test_by"

  super()
end

Public Instance Methods

with_args(args) click to toggle source
# File lib/rspec/bash/mocks/matchers/test_by.rb, line 17
def with_args(args)
  tap {
    fullexpr = "#{@double.expr} #{args}"

    @double.expected_calls << fullexpr
    @double.behaviors << create_behavior(args: fullexpr)
  }
end