Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This is a gem for adding more rspec matchers, macros

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Manifest
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 rspec_more.gemspec
README.md

rspec_more -- provides some rpsec matcher and macros

DESCRIPTION

This gem is intending to provide more macros and matchers for rspec The current supported macros:

  • reequire_attribute attr

This macro does validation for a model and currently only works for DataMapper an example usage:

describe User do
  let(:user) {User.make_unsaved} # suppose you use machinist
  describe "validations" do
    require_attribute :name
  end
end

The let that defines user method is required for now. The macro relies on the model object is defined

INSTALL

$ [sudo] gem install rspec_more

Then in the spec_helper.rb, add:

config.extend(RspecMore::DataMapper, :type => :model) 
Something went wrong with that request. Please try again.