Module: Transpec::Syntax::Expectizable
- Includes:
- SendNodeSyntax
- Included in:
- Should, ShouldReceive
- Defined in:
- lib/transpec/syntax/expectizable.rb
Instance Method Summary collapse
Methods included from SendNodeSyntax
#arg_node, #arg_range, #method_name, #receiver_node, #receiver_range, #selector_range
Instance Method Details
#wrap_subject_in_expect! ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/transpec/syntax/expectizable.rb', line 11 def wrap_subject_in_expect! if Util.in_parentheses?(subject_node) insert_before(subject_range, 'expect') else insert_before(subject_range, 'expect(') insert_after(subject_range, ')') end end |