Skip to content
This is a gem for adding more rspec matchers, macros
Ruby
Find file
Latest commit 0908e57 Jul 6, 2011 @ywen2 ywen2 new version
Failed to load latest commit information.
lib new version Jul 6, 2011
.gitignore gemspec Apr 15, 2011
.rvmrc first working require Apr 15, 2011
CHANGELOG new version Jul 6, 2011
Gemfile using subject if there is one Jun 22, 2011
Gemfile.lock using subject if there is one Jun 22, 2011
Manifest using subject if there is one Jun 22, 2011
README.md updated readme Apr 15, 2011
Rakefile added homepage Apr 15, 2011
rspec_more.gemspec new version Jul 6, 2011

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.