Class: Rubidium::SpecWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/rubidium/spec_writer.rb

Instance Method Summary collapse

Constructor Details

#initialize(output_folder) ⇒ SpecWriter

Returns a new instance of SpecWriter.



7
8
9
# File 'lib/rubidium/spec_writer.rb', line 7

def initialize(output_folder)
  @output_folder   = output_folder
end

Instance Method Details

#write!(*tests) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/rubidium/spec_writer.rb', line 11

def write!(*tests)
  tests.flatten!
  process_rakefile
  process_helper
  test_suites, test_cases = tests.partition { |t| t.is_a?(Rubidium::TestSuite) } 
  process_test_suites test_suites
  process_test_cases test_cases
end