module Transpec::Syntax::Mixin::Expectizable

Public Instance Methods

wrap_subject_in_expect!() click to toggle source
# File lib/transpec/syntax/mixin/expectizable.rb, line 12
def wrap_subject_in_expect!
  wrap_subject_with_method!('expect')
end

Private Instance Methods

wrap_subject_with_method!(method) click to toggle source
# File lib/transpec/syntax/mixin/expectizable.rb, line 18
def wrap_subject_with_method!(method)
  if Util.in_explicit_parentheses?(subject_node)
    insert_before(subject_range, method)
  else
    wrap(subject_range, "#{method}(", ')')
  end
end