Delete static_fixtures.rb for static HAML fixtures
This commit is contained in:
parent
924cd417c4
commit
2f704d8356
3 changed files with 15 additions and 30 deletions
|
@ -1,11 +0,0 @@
|
||||||
%table
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th Environment
|
|
||||||
%th Last deployment
|
|
||||||
%th Job
|
|
||||||
%th Commit
|
|
||||||
%th
|
|
||||||
%th
|
|
||||||
%tbody
|
|
||||||
%tr#environment-row
|
|
15
spec/javascripts/fixtures/static/environments/table.html
Normal file
15
spec/javascripts/fixtures/static/environments/table.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Environment</th>
|
||||||
|
<th>Last deployment</th>
|
||||||
|
<th>Job</th>
|
||||||
|
<th>Commit</th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr id="environment-row"></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -1,19 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe ApplicationController, '(Static JavaScript fixtures)', type: :controller do
|
|
||||||
include JavaScriptFixturesHelpers
|
|
||||||
|
|
||||||
Dir.glob('{,ee/}spec/javascripts/fixtures/**/*.haml').map do |file_path|
|
|
||||||
it "static/#{file_path.sub(%r{\A(ee/)?spec/javascripts/fixtures/}, '').sub(/\.haml\z/, '')}" do |example|
|
|
||||||
store_frontend_fixture(render_template(file_path), example.description)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def render_template(template_file_name)
|
|
||||||
controller = ApplicationController.new
|
|
||||||
controller.prepend_view_path(File.dirname(template_file_name))
|
|
||||||
controller.render_to_string(template: File.basename(template_file_name), layout: false)
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in a new issue