This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Mar 16 15:35:19 -0700 2009 | |
| |
LICENSE | Tue Mar 17 06:59:37 -0700 2009 | |
| |
README.rdoc | Thu Apr 09 00:37:17 -0700 2009 | |
| |
Rakefile | Thu Apr 09 00:37:17 -0700 2009 | |
| |
VERSION.yml | Thu Apr 09 00:41:35 -0700 2009 | |
| |
init.rb | Tue Mar 17 06:59:22 -0700 2009 | |
| |
lib/ | Thu Apr 09 00:37:17 -0700 2009 | |
| |
rspec-factory-girl.gemspec | Thu Apr 09 00:45:33 -0700 2009 | |
| |
spec/ | Thu Apr 09 00:37:17 -0700 2009 |
README.rdoc
RSpec - Factory Girl
RSpec matcher collection for testing your model built with factory girl.
describe Post do
it { should be_built_by_factory } # Factory named ':post' is used
it { should be_created_by_factory } # Factory named ':post' is used
it { should be_built_by_factory(:my_factory) }
it { should be_created_by_factory(:my_factory) }
end
Install
Run the following if you haven’t already:
gem sources -a http://gems.github.com
Install the gem:
sudo gem install yannlugrin-rspec-factory-girl
Installing via Rails
Specify the gem dependency in your config/environment.rb file after ‘spec/rails’ dependency:
config.gem "yannlugrin-rspec-factory-girl", :lib => "rspec/factory_girl", :source => "http://gems.github.com"
Then run in terminal:
$ rake gems:install
As a Plugin
You can also install Remarkable as a plugin:
$ script/plugin install git://github.com/yannlugrin/rspec-factory-girl.git
Or using git submodules:
$ git submodule add git://github.com/yannlugrin/rspec-factory-girl.git vendor/plugins/rspec-factory-girl
Requirements
- activerecord >= 2.3.2
- factory_girl >= 1.2.0
- rspec >= 1.2.0
- rspec-rails >= 1.2.0
RubyGems
RubyGems is not required by this library, if you have a LoadError when you run rake tasks, use follwing command:
RUBYOPT="rubygems" rake
or export RUBYOPTS before launch rake tasks:
RUBYOPT="rubygems" export RUBYOPT
More information
Github: www.github.com/yannlugrin/rspec-factory-girl Bug tracking: yannlugrin.lighthouseapp.com/projects/27537-rspec-factory-girl/overview
Copyright & License
Copyright © 2009 Yann Lugrin. See LICENSE for details.








