Sha256: 72515d8fdca1b62658f56175b5bc34417a6f02910ace9df6deaba277e0c1cd3d

Contents?: true

Size: 338 Bytes

Versions: 12

Compression:

Stored size: 338 Bytes

Contents

require 'salesforce_id'
require 'salesforce_id/rspec'
require 'rspec/expectations'

module ::SalesforceId::RSpec

  module BeSafeSalesforceIdMatcher
    extend RSpec::Matchers::DSL

    matcher :be_safe_salesforce_id do
      match do |id|
        SalesforceId.valid?(id) && SalesforceId(id).to_s == id.to_s
      end
    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
salesforce_id-1.4.6 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.4.5 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.4.4 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.4.3 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.4.2 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.4.1 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.4.0 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.3.4 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.3.3 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.3.2 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.3.1 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb
salesforce_id-1.3.0 lib/salesforce_id/rspec/be_safe_salesforce_id_matcher.rb