Sha256: 8a778f71d793ec2712f9e460fb89b75958f9ffa79c816f39e88dcb673c860e1a
Contents?: true
Size: 1.18 KB
Versions: 6
Compression:
Stored size: 1.18 KB
Contents
# RSpec Apotomo *Spec your widgets!* [![Build Status](https://secure.travis-ci.org/apotonick/rspec-apotomo.png)](http://travis-ci.org/apotonick/rspec-apotomo) This gem allows you to test widgets with [Apotomo](http://apotomo.de) via RSpec. Works with Rails 3.x and RSpec 2. # Installation In your Rails `Gemfile` add this line: ``` group :test do gem 'rspec-apotomo' end ``` # Usage Put specs in the `spec/widgets` directory. *TODO Add the generator and generator docs.* An example spec could look like the following code. ``` describe CommentsWidget do has_widgets do |root| root << widget(:comments) end it 'renders properly' do render_widget(:comments).should == "<h1>No Comment!</h1>" end it 'responds to :post events' do trigger(:post, :comments, :text => "I like you!").should == ["Thanks!"] end end ``` # Running the specs Run your examples with: ``` rake spec:widgets ``` # Contributors * [Christian Höltje](http://docwhat.org/) * [Jake Goulding](http://jakegoulding.com/) * [Vivisimo, Inc.](http://vivisimo.com/) # LICENSE Copyright © 2011 Vivisimo, Inc., Christian Höltje, Jake Goulding, Nick Sutterer Released under the MIT License
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
rspec-apotomo-0.9.7 | README.mkd |
rspec-apotomo-0.9.6 | README.mkd |
rspec-apotomo-0.9.5 | README.mkd |
rspec-apotomo-0.9.4 | README.mkd |
rspec-apotomo-0.9.3 | README.mkd |
rspec-apotomo-0.9.2 | README.mkd |