Sha256: 0d8331448d81b84b7ceab6a2ca5ecfee5c7fe15c38e698b88b22bf0054a3ee11
Contents?: true
Size: 959 Bytes
Versions: 13
Compression:
Stored size: 959 Bytes
Contents
RSpec::Matchers.define :be_permitted_to do |*args| def supports_block_expectations? true end failure_message do |actual| "expected that #{ actual.class.name } would be permitted to #{ expected.first } #{ expected.second }" end match do |policy| policy.permit?( *args ) end end RSpec::Matchers.define :maybe_be_permitted_to do |*args| def supports_block_expectations? true end failure_message do |actual| "expected that #{ actual.class.name } might be permitted to #{ expected.first } #{ expected.second }" end match do |policy| policy.permit?( *args ) == :maybe end end RSpec::Matchers.define :absolutely_be_permitted_to do |*args| def supports_block_expectations? true end failure_message do |actual| "expected that #{ actual.class.name } would absolutely be permitted to #{ expected.first } #{ expected.second }" end match do |policy| policy.permit?( *args ) == :yes end end
Version data entries
13 entries across 13 versions & 1 rubygems