faclet
factory_girl + let(RSpec) = faclet
Installation
Add this line to your application's Gemfile:
group :test
gem 'faclet'
end
And then execute:
$ bundle
Or install it yourself as:
$ gem install faclet
Usage
Add the following code to spec_helper.rb
:
require 'faclet'
RSpec.configure do |config|
...
config.extend Faclet::Syntax
...
end
Methods
faclet(:user) #=> let(:user) { FactoryGirl.create(:user) }
faclet!(:user) #=> let!(:user) { FactoryGirl.create(:user) }
fubject(:user) #=> subject(:user) { FactoryGirl.create(:user) }
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request