Sha256: 9316b3c5f5cd6d2d896e6f74973f5b5a95826cd78afa90639de5db4f32f3304f

Contents?: true

Size: 231 Bytes

Versions: 32

Compression:

Stored size: 231 Bytes

Contents

Spec::Matchers.define :smart_match do |expected|
  match do |actual|
    case expected
    when /^\/.*\/?$/
      actual =~ eval(expected)
    when /^".*"$/
      actual.index(eval(expected))
    else
      false
    end
  end
end

Version data entries

32 entries across 32 versions & 9 rubygems

Version Path
hubbub-0.0.11 lib/vendor/plugins/rspec/features/support/matchers/smart_match.rb
hubbub-0.0.10 lib/vendor/plugins/rspec/features/support/matchers/smart_match.rb
hubbub-0.0.9 lib/vendor/plugins/rspec/features/support/matchers/smart_match.rb
hubbub-0.0.8 lib/vendor/plugins/rspec/features/support/matchers/smart_match.rb
hubbub-0.0.6 lib/vendor/plugins/rspec/features/support/matchers/smart_match.rb
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/features/support/matchers/smart_match.rb
media-path-0.1.2 vendor/rspec/features/support/matchers/smart_match.rb
simple-templater-0.0.1.3 vendor/rspec/features/support/matchers/smart_match.rb
pupu-0.0.2.pre vendor/rspec/features/support/matchers/smart_match.rb
media-path-0.1.1.pre vendor/rspec/features/support/matchers/smart_match.rb
simple-templater-0.0.1.2 vendor/rspec/features/support/matchers/smart_match.rb
media-path-0.1.1 vendor/rspec/features/support/matchers/smart_match.rb
simple-templater-0.0.1.1 vendor/rspec/features/support/matchers/smart_match.rb
pupu-0.0.2 vendor/rspec/features/support/matchers/smart_match.rb
rango-0.0.6 vendor/rspec/features/support/matchers/smart_match.rb
rango-0.1.pre vendor/rspec/features/support/matchers/smart_match.rb
pupu-0.0.1 vendor/rspec/features/support/matchers/smart_match.rb
media-path-0.1 vendor/rspec/features/support/matchers/smart_match.rb
simple-templater-0.0.1 vendor/rspec/features/support/matchers/smart_match.rb
middleman-0.10.17 vendor/gems/gems/rspec-1.2.9/features/support/matchers/smart_match.rb