module SpecSelectorUtil::Initialize
The Initialize
module contains methods that initialize specific sets of instance variables for the SpecSelector
instance.
Public Instance Methods
get_descriptions()
click to toggle source
# File lib/spec_selector/initialize.rb, line 50 def get_descriptions if File.exist?(@descriptions_file) included = File.open(@descriptions_file) @last_run_descriptions = JSON.load(included) else @last_run_descriptions = [] end end
get_locations()
click to toggle source
# File lib/spec_selector/initialize.rb, line 40 def get_locations if File.exist?(@locations_file) locations = File.open(@locations_file) @last_run_locations = JSON.load(locations) @filter_mode = :location else @last_run_locations = [] end end
init_counters()
click to toggle source
# File lib/spec_selector/initialize.rb, line 18 def init_counters @pass_count = 0 @fail_count = 0 @pending_count = 0 end
init_example_store()
click to toggle source
# File lib/spec_selector/initialize.rb, line 7 def init_example_store @failed = [] @passed = [] @pending = [] end
init_filter()
click to toggle source
# File lib/spec_selector/initialize.rb, line 59 def init_filter inclusion_filter_path = "#{current_path}/inclusion_filter" Dir.mkdir(inclusion_filter_path) unless Dir.exist?(inclusion_filter_path) @descriptions_file = "#{current_path}/inclusion_filter/descriptions.json" @locations_file = "#{current_path}/inclusion_filter/locations.json" @inclusion_filter = [] @filter_mode = :description get_descriptions get_locations end
init_map()
click to toggle source
# File lib/spec_selector/initialize.rb, line 28 def init_map @groups = {} @map = {} @active_map = @map @list = nil end
init_pass_inclusion()
click to toggle source
# File lib/spec_selector/initialize.rb, line 24 def init_pass_inclusion @exclude_passing = false end
init_selector()
click to toggle source
# File lib/spec_selector/initialize.rb, line 35 def init_selector @selected = nil @selector_index = 0 end
init_summaries()
click to toggle source
# File lib/spec_selector/initialize.rb, line 13 def init_summaries @failure_summaries = {} @pending_summaries = {} end
initialize_all()
click to toggle source
# File lib/spec_selector/initialize.rb, line 70 def initialize_all @messages = [] @notices = [] init_example_store init_summaries init_counters init_pass_inclusion init_map init_selector init_filter @instructions = false end