lib/generators/rspec/templates/cell_spec.erb in rspec-cells-0.2.0 vs lib/generators/rspec/templates/cell_spec.erb in rspec-cells-0.2.1
- old
+ new
@@ -5,10 +5,10 @@
context 'cell rendering' do
<%- actions.each_with_index do |state, index| -%>
context 'rendering <%= state %>' do
subject { render_cell(<%= cell_name %>, :<%= state %>) }
- <%- if defined?(Capybara) -%>
+ <%- 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' }