Sha256: 9beee1e86173ff6abac3d7680f665ad81d8214bdffdd3e25caef88ad9060ff55

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 Bytes

Contents

Spec::Matchers.define :be_invalid_without do |attribute|
  match do |record|
    record.valid?
    record.errors.include?(attribute.to_sym)
  end
end

Spec::Matchers.define :have_user_accessors do
  match do |record|
    [record.respond_to?(:first_name),
    record.respond_to?(:last_name),
    record.respond_to?(:email),
    record.respond_to?(:password),
    record.respond_to?(:password_confirmation)].all?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bento-0.0.2 spec/support/bento_spec_helper.rb
bento-0.0.1 spec/support/bento_spec_helper.rb