Class: Transpec::Syntax::ExampleGroup::NonMonkeyPatchRecordBuilder
- Inherits:
-
RecordBuilder
- Object
- RecordBuilder
- Transpec::Syntax::ExampleGroup::NonMonkeyPatchRecordBuilder
- Defined in:
- lib/transpec/syntax/example_group.rb
Instance Attribute Summary collapse
-
#example_group ⇒ Object
readonly
Returns the value of attribute example_group.
Instance Method Summary collapse
- #base_syntax ⇒ Object
-
#initialize(example_group) ⇒ NonMonkeyPatchRecordBuilder
constructor
A new instance of NonMonkeyPatchRecordBuilder.
- #new_syntax ⇒ Object
- #old_syntax ⇒ Object
Methods inherited from RecordBuilder
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 |