Sha256: ca3075c714a69d4f6ea8868d448b49c43c7cd329e471675f30a0c8b0a3bef00e

Contents?: true

Size: 337 Bytes

Versions: 6

Compression:

Stored size: 337 Bytes

Contents

RSpec::Matchers.define :have_role do |*args|
  match do |resource|
    resource.has_role?(*args)
  end

  failure_message_for_should do |resource|
    "expected to have role #{args.map(&:inspect).join(" ")}"
  end

  failure_message_for_should_not do |resource|
    "expected not to have role #{args.map(&:inspect).join(" ")}"
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rolify-3.3.0 lib/rolify/matchers.rb
third-prestige-rolify-3.3.0.rc5 lib/rolify/matchers.rb
rolify-3.3.0.rc4 lib/rolify/matchers.rb
rolify-3.3.0.rc3 lib/rolify/matchers.rb
rolify-3.3.0.rc2 lib/rolify/matchers.rb
rolify-3.3.0.rc1 lib/rolify/matchers.rb