Sha256: 68f82e399f0b600a3daf4f03916fe586376e85254a4e3ec888606b9c5e7053dd

Contents?: true

Size: 208 Bytes

Versions: 3

Compression:

Stored size: 208 Bytes

Contents

RSpec::Matchers.define :have_a_single_occurence_of do |expected|
  match do |actual|
    actual.scan(expected).size == 1
  end

  description do
    "have a single occurence of #{expected.inspect}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tiny-rails-0.1.1 spec/support/matchers/have_single_occurrence_matcher.rb
tiny-rails-0.1.0 spec/support/matchers/have_single_occurrence_matcher.rb
tiny-rails-0.0.2 spec/support/matchers/have_single_occurrence_matcher.rb