Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Spec your Cells.
tag: v0.0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
CHANGES.textile
Gemfile
MIT-LICENSE
README.rdoc
Rakefile
rspec-cells.gemspec

README.rdoc

Rspec Cells

Spec your Cells.

This plugin allows you to test your cells easily using RSpec. Basically, it adds a cells example group with a #render_cell helper.

Cells is Rails' popular view components framework.

Installation

This gem runs with RSpec2 and Rails 3.0, so just add it to your app's Gemfile.

group :test do
  gem "rspec-cells"

Usage

Put all your specs under spec/cells folder. Here is how a simple spec could look like.

describe PostsCell do
  it "should render the posts count" do
    render_cell(:posts, :count).should have_selector("p", :content => "4 posts!")
  end

end

Run your examples with

rake spec:cells

If you need more helpers, matchers and stuff, just let us know.

LICENSE

Copyright © 2010, Nick Sutterer

Copyright © 2007-2009, Dmytro Shteflyuk <kpumuk@kpumuk.info> kpumuk.info

Released under the MIT License.

Something went wrong with that request. Please try again.