Sha256: 0052840ee1505a9147d69de8f7f7652a23f9f8f1ccb74ef5206307c3f952b072

Contents?: true

Size: 620 Bytes

Versions: 1

Compression:

Stored size: 620 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", :text => "<%= class_name %>#<%= state %>") }
      it { should have_selector("p", :text => "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

1 entries across 1 versions & 1 rubygems

Version Path
rspec-cells-0.0.3 lib/generators/rspec/templates/cell_spec.erb