Sha256: dd892ec2bcf45a9518abca584d486bb546faeb66a1195bc69eab98c553bf3aa5
Contents?: true
Size: 920 Bytes
Versions: 2
Compression:
Stored size: 920 Bytes
Contents
require 'spec_helper' describe <%= class_name %>Cell do context "cell instance" do subject { cell(<%= cell_name %>) } <%- for state in actions -%> it { should respond_to(:<%= state %>) } <%- end -%> end 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 { should have_selector("h1", :text => "<%= class_name %>#<%= state %>") } it { should have_selector("p", :text => "Find me in app/cells/<%= file_path %>/<%= state %>.html") } <%- else -%> it { should include "<%= class_name %>#<%= state %>" } it { should include "Find me in app/cells/<%= file_path %>/<%= state %>.html" } <%- end -%> end <%- unless index == actions.length - 1 -%> <%- end -%> <%- end -%> end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspec-cells-0.1.11 | lib/generators/rspec/templates/cell_spec.erb |
rspec-cells-0.1.10 | lib/generators/rspec/templates/cell_spec.erb |