class Transpec::Syntax::CurrentExample::RecordBuilder
Public Instance Methods
base_dsl()
click to toggle source
# File lib/transpec/syntax/current_example.rb, line 92 def base_dsl dsl = "#{current_example.block_method_name}" dsl << '(:name)' if HELPER_METHODS.include?(current_example.block_method_name) dsl end
new_syntax()
click to toggle source
# File lib/transpec/syntax/current_example.rb, line 84 def new_syntax if current_example.block_node "#{base_dsl} { |example| example }" else 'def helper_method RSpec.current_example; end' end end
old_syntax()
click to toggle source
# File lib/transpec/syntax/current_example.rb, line 76 def old_syntax if current_example.block_node "#{base_dsl} { example }" else 'def helper_method example; end' end end