Class: Transpec::Syntax::ExampleGroup::NonMonkeyPatchRecordBuilder

Inherits:
RecordBuilder
  • Object
show all
Defined in:
lib/transpec/syntax/example_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RecordBuilder

build, #build

Constructor Details

#initialize(example_group) ⇒ NonMonkeyPatchRecordBuilder

Returns a new instance of NonMonkeyPatchRecordBuilder.



102
103
104
# File 'lib/transpec/syntax/example_group.rb', line 102

def initialize(example_group)
  @example_group = example_group
end

Instance Attribute Details

#example_group ⇒ Object (readonly)

Returns the value of attribute example_group.



100
101
102
# File 'lib/transpec/syntax/example_group.rb', line 100

def example_group
  @example_group
end

Instance Method Details

#base_syntax ⇒ Object



114
115
116
# File 'lib/transpec/syntax/example_group.rb', line 114

def base_syntax
  "#{example_group.method_name} 'something' { }"
end

#new_syntax ⇒ Object



110
111
112
# File 'lib/transpec/syntax/example_group.rb', line 110

def new_syntax
  "RSpec.#{base_syntax}"
end

#old_syntax ⇒ Object



106
107
108
# File 'lib/transpec/syntax/example_group.rb', line 106

def old_syntax
  base_syntax
end