Sha256: d38072968d4960d65aae7eba073a9a752b80c55b0c33985534607908f0645ec2

Contents?: true

Size: 1.95 KB

Versions: 3

Compression:

Stored size: 1.95 KB

Contents

require 'test_helper'

module TechRadar
  class RadarTest < ActiveSupport::TestCase

    setup do
      @radar = TechRadar::Radar.new
    end

    test "quadrants" do
      assert_equal ["Tools", "Platforms", "Techniques", "Languages and Frameworks"], @radar.quadrants.map(&:name)
    end

    test "quadrant" do
      assert_equal ["RabbitMQ", "Resque" ], @radar.quadrant("Tools").rings.detect { |ring| ring.name == "Adopt" }.technologies.map(&:name)
    end

    test "technologies" do
      expected_names = [
        "AWS",
        "Cloudfront",
        "CoffeeScript",
        "Consumer-driven tests for services",
        "ElasticSearch",
        "Heroku",
        "HTTP Services",
        "HumbleKit",
        "iOS",
        "JIRA",
        "JQuery",
        "Objective-C",
        "RabbitMQ",
        "Redis as a database",
        "Resque",
        "Ruby",
        "Shared Gems",
        "Sidekiq",
        "SwiftTask",
        "Weekly sync-ups with Business Partners",
      ]
      assert_equal expected_names,@radar.technologies.map(&:name) 
    end

    test "technology" do
      technology = @radar.technology("Ruby")
      assert_equal "Ruby"                          , technology.name
      assert_equal "https://www.ruby-lang.org/en/" , technology.more_details_url
      assert_equal "Ruby is a dynamic, _object-oriented_ programming language that combines ideas from Smalltalk, Perl, and others",
                   technology.more_details_summary
      assert_equal nil                             , technology.why_url
      assert_equal nil                             , technology.why_summary
      assert_equal "Middleware Programming"        , technology.purpose
    end

    test "rings" do
      assert_equal ["Adopt","Trial","Assess","Hold"],@radar.rings.map(&:name)
      assert_equal [ "Heroku", "RabbitMQ", "Resque", "Ruby", "Weekly sync-ups with Business Partners",],@radar.rings.detect { |ring| ring.name == "Adopt" }.technologies.map(&:name)
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tech_radar-0.4.0 test/models/tech_radar/radar_test.rb
tech_radar-0.3.0 test/models/tech_radar/radar_test.rb
tech_radar-0.2.1 test/models/tech_radar/radar_test.rb