Sha256: 8e923e7459b4f8e1312ae10f41f21a204a1195635e958e1c055d8dd82da77f8c
Contents?: true
Size: 924 Bytes
Versions: 6
Compression:
Stored size: 924 Bytes
Contents
<% spec_opts = ENV['SPEC_OPTS'] if spec_opts && !spec_opts.empty? %> RSpec.configure do |config| <% if (match = /--(no-)?color\b/.match(spec_opts)) color_value = !match.captures[0] # Have to use instance_variable_set because config.color= is designed to not allow overriding color once it's set, but # we do not yet have true SPEC_OPTS parsing via RSpec config to get it initially set %> config.instance_variable_set(:@color, <%=color_value.to_s%>) <% end if (requires = spec_opts.scan(/--require \S+/)).any? requires.map {|r| /--require (.*)/.match(r).captures[0]}.each do |req| %> require "<%= req %>" <% end end if (match = /--format (\S+)/.match(spec_opts)) formatter = match.captures[0] %> config.formatter = "<%=formatter%>" <% end %> end <% end %>
Version data entries
6 entries across 6 versions & 2 rubygems