Sha256: 424bec91396c9634ad50dd5b5afda6290bf7db8c615ab045cacc9b880c3759b7

Contents?: true

Size: 342 Bytes

Versions: 4

Compression:

Stored size: 342 Bytes

Contents

# frozen_string_literal: true

require 'minitest/autorun'
require 'legitbot'

class LegitbotTest < Minitest::Test
  def test_rules
    refute Legitbot.bot('Firefox', '127.0.0.1')
    assert Legitbot.bot('Googlebot', '5.140.70.64')

    Legitbot.bot('Firefox', '127.0.0.1') do |_bot|
      flunk 'No bot Firefox is possible'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
legitbot-1.7.1 test/legitbot_test.rb
legitbot-1.7.0 test/legitbot_test.rb
legitbot-1.6.1 test/legitbot_test.rb
legitbot-1.6.0 test/legitbot_test.rb