Sha256: 9836897c8d23374cce5c634c73f1b678839817141b0eb0d6d561c698fa859f36

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

require 'minitest/autorun'
require 'minitest/pride'

require_relative '../src/such_userstream_bot.rb'

class TestSuchUserstreamBot <  Minitest::Test

  def test_reverses_hello_world
    assert_match (SuchUserstreamBot.respond_to 'hello world'), 'dlrow olleh'
  end

  def test_responds_with_less_than_140
    assert_equal false, [*0...1000].map{ |_| SuchUserstreamBot.respond_to 'hello world' + rand.to_s }.any?{ |t| t.length > 140 }
  end

  def test_responds_with_less_than_140_even_to_greater_than_140
    assert_equal false, [*0...1000].map { |_| SuchUserstreamBot.respond_to  'hello' * 30 }.any?{ |t| t.length > 140 }
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter_bot_generator-0.2.3 such_userstream_bot/test/such_userstream_bot_test.rb