Refactor supplier settings

This commit is contained in:
2014-07-16 17:41:43 +02:00
parent a302123c6b
commit 2fec0b3bb6
31 changed files with 311 additions and 49 deletions
+9
View File
@@ -125,6 +125,15 @@ RSpec.configure do |config|
Capybara.session_name = :default
end
config.after :suite do
rspec_outfile = Rails.root.join('coverage/rspec_results.html')
result = File.read rspec_outfile
replacement = %|<body><div><a href="index.html" style="padding:4px 8px;background-color:#393;color:white;font-weight:bold;border:2px #050 outset">Coverage</a></div>|
result.gsub! /<body>/, replacement
File.open(rspec_outfile, 'w'){|f| f.puts result}
`open #{rspec_outfile}`
end
# If true, the base class of anonymous controllers will be inferred
# automatically. This will be the default behavior in future versions of
# rspec-rails.