File: minitest_spec_example.rb

package info (click to toggle)
ruby-ruby-lsp 0.26.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,676 kB
  • sloc: ruby: 35,294; javascript: 29; sh: 7; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 680 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

require "minitest/spec"
require "minitest/autorun"

Minitest::Spec.i_suck_and_my_tests_are_order_dependent!

module First
  module Second
    module Third
      class MySpec < Minitest::Spec
        # Anonymous example
        it do
          assert_equal(1, 1)
        end

        describe "when something is true" do
          describe "and other thing is false" do
            it "does what's expected" do
              assert(true)
            end
          end

          class NestedSpec < Minitest::Spec
            it "does something else" do
              assert(true)
            end
          end
        end
      end
    end
  end
end