Sha256: a90d9dff0b46bd03e4a505b0386cb5c2645e5d5259f82f29bc3b1d1ad1cdbd3c

Contents?: true

Size: 415 Bytes

Versions: 19

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

require 'minitest/autorun'
require 'legitbot'

class LegitbotTest < Minitest::Test
  def test_rules
    assert !Legitbot.bot('Firefox', '127.0.0.1'),
           msg: 'Not a bot'
    assert Legitbot.bot('Googlebot', '5.140.70.64'),
           msg: 'No reverse resolve, bot'

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
legitbot-1.5.1 test/legitbot_test.rb
legitbot-1.5.0 test/legitbot_test.rb
legitbot-1.4.5 test/legitbot_test.rb
legitbot-1.4.4 test/legitbot_test.rb
legitbot-1.4.3 test/legitbot_test.rb
legitbot-1.4.2 test/legitbot_test.rb
legitbot-1.4.1 test/legitbot_test.rb
legitbot-1.4.0 test/legitbot_test.rb
legitbot-1.3.0 test/legitbot_test.rb
legitbot-1.2.0 test/legitbot_test.rb
legitbot-1.1.1 test/legitbot_test.rb
legitbot-1.1.0 test/legitbot_test.rb
legitbot-1.0.2 test/legitbot_test.rb
legitbot-1.0.1 test/legitbot_test.rb
legitbot-1.0.0 test/legitbot_test.rb
legitbot-0.4.3 test/legitbot_test.rb
legitbot-0.4.2 test/legitbot_test.rb
legitbot-0.4.1 test/legitbot_test.rb
legitbot-0.4.0 test/legitbot_test.rb