Sha256: 21b5996925e167b20571eb4c17400f13a7ac9899643b669adc814fb0cf26fb0f

Contents?: true

Size: 1.57 KB

Versions: 9

Compression:

Stored size: 1.57 KB

Contents

# Rails app RSpec 2 matchers

RSpec 2 matchers to spec the structure of your Rails 3 app

## Install

<code>gem install rails-app-spec</code>

## Usage

See specs for more details on how to use the API.

Usage example (teaser):
<pre>
  require 'rails3_assist'
  require 'rails-app-spec'  
  
  Rails.root.should have_controller :account do |content|
    content.should have_method :index
  end

  Rails.root.should have_controller_file :account do |controller_file|
    controller_file.should have_controller_class :account do |klass|
      klass.should have_method :index
    end
  end

  Rails.root.should have_view_files :edit, :new, :show, :folder => :person	

  Rails.root.should have_view_dirs :person, :post, :blog	

  Rails.root.should have_model_dirs :admin, :editor

  Rails.root.should have_controller_files :person, :post, :blog	

  Rails.root.should have_stylesheet_files :light, :basic, :dark
  Rails.root.should have_javascript_files :form_validation, :effects
end  
</pre>  

This library takes advantage of *code-spec*, *file-spec* and other essential spec extensions I have created ;)

## Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

## Copyright

Copyright (c) 2010 Kristian Mandrup. See LICENSE for details.

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails-app-spec-0.3.2 README.markdown
rails-app-spec-0.3.1 README.markdown
rails-app-spec-0.3.0 README.markdown
rails-app-spec-0.2.16 README.markdown
rails-app-spec-0.2.15 README.markdown
rails-app-spec-0.2.14 README.markdown
rails-app-spec-0.2.13 README.markdown
rails-app-spec-0.2.12 README.markdown
rails-app-spec-0.2.10 README.markdown