Sha256: 7477bc2c3a7e53e57e4f2da93eafe3d88c8c6d1f46f1c84f5950feb57ceb2a7d

Contents?: true

Size: 622 Bytes

Versions: 4

Compression:

Stored size: 622 Bytes

Contents

require 'spec_helper'

describe <%= class_name %>Cell do
  context "cell rendering" do 
    <% for state in actions %>
    context "rendering <%= state %>" do
      subject { render_cell(:<%= file_name %>, :<%= state %>) }
  
      it { should have_selector("h1", :content => "<%= class_name %>#<%= state %>") }
      it { should have_selector("p", :content => "Find me in app/cells/<%= file_name %>/<%= state %>.html") }
    end
    <% end %>
  end


  context "cell instance" do 
    subject { cell(:<%= file_name %>) } 
    <% for state in actions %>
    it { should respond_to(:<%= state %>) }
    <% end %>
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-cells-0.1.4 lib/generators/rspec/templates/cell_spec.erb
rspec-cells-0.1.3 lib/generators/rspec/templates/cell_spec.erb
rspec-cells-0.1.2 lib/generators/rspec/templates/cell_spec.erb
rspec-cells-0.1.1 lib/generators/rspec/templates/cell_spec.erb