Sha256: 408adaf9349281f0b7b4d107bb91f05777e90a905c33ed6ff1d193ea94b8a808
Contents?: true
Size: 856 Bytes
Versions: 11
Compression:
Stored size: 856 Bytes
Contents
require 'rails_helper' RSpec.describe <%= class_name %>Cell, type: :cell do context 'cell rendering' do <%- actions.each_with_index do |state, index| -%> context 'rendering <%= state %>' do subject { cell(<%= cell_name %>, <%= class_name %>.new).call(:<%= state %>) } <%- if defined?(::Capybara) -%> it { is_expected.to have_selector('h1', text: '<%= class_name %>#<%= state %>') } it { is_expected.to have_selector('p', text: 'Find me in app/cells/<%= file_path %>/<%= state %>.<%= template_engine %>') } <%- else -%> it { is_expected.to include '<%= class_name %>#<%= state %>' } it { is_expected.to include 'Find me in app/cells/<%= file_path %>/<%= state %>.<%= template_engine %>' } <%- end -%> end <%- unless index == actions.length - 1 -%> <%- end -%> <%- end -%> end end
Version data entries
11 entries across 11 versions & 1 rubygems