Sha256: 934788ef77561aca1f900ef5e674a76e74b1da2ae9ff2ef21679bf80523017ef
Contents?: true
Size: 790 Bytes
Versions: 1
Compression:
Stored size: 790 Bytes
Contents
require 'spec_helper' describe <%= class_name %>Cell, type: :cell do context 'cell rendering' do <%- actions.each_with_index do |state, index| -%> context 'rendering <%= state %>' do subject { render_cell(<%= cell_name %>, :<%= 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 %>.html') } <%- else -%> it { is_expected.to include '<%= class_name %>#<%= state %>' } it { is_expected.to include 'Find me in app/cells/<%= file_path %>/<%= state %>.html' } <%- end -%> end <%- unless index == actions.length - 1 -%> <%- end -%> <%- end -%> end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-cells-0.2.0 | lib/generators/rspec/templates/cell_spec.erb |