Class: Pretentious::RspecGenerator
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
#body, #buffer, #buffer_inline, #buffer_inline_to_string, #buffer_to_string, #initialize, #setup_fixture
Class Method Details
.to_sym ⇒ Object
4
5
6
|
# File 'lib/pretentious/rspec_generator.rb', line 4
def self.to_sym
:spec
end
|
Instance Method Details
#begin_spec(test_class) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/pretentious/rspec_generator.rb', line 8
def begin_spec(test_class)
buffer('# This file was automatically generated by the pretentious gem')
buffer("require 'spec_helper'")
whitespace
buffer("RSpec.describe #{test_class.name} do")
end
|
#end_spec ⇒ Object
15
16
17
|
# File 'lib/pretentious/rspec_generator.rb', line 15
def end_spec
buffer('end')
end
|
#output ⇒ Object
19
20
21
|
# File 'lib/pretentious/rspec_generator.rb', line 19
def output
@output_buffer
end
|