Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This is a gem for adding more rspec matchers, macros
Ruby
Branch: master
Failed to load latest commit information.
lib new version
.gitignore gemspec
.rvmrc first working require
CHANGELOG new version
Gemfile using subject if there is one
Gemfile.lock using subject if there is one
Manifest using subject if there is one
README.md updated readme
Rakefile added homepage
rspec_more.gemspec new version

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.