File: test_focus.rb

package info (click to toggle)
ruby-minitest-focus 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112 kB
  • sloc: ruby: 66; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 691 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require "minitest/autorun"
require "minitest/focus"

class MyTest1 < Minitest::Test
         def test_fail;            flunk; end
  focus; def test_method;          pass;  end
  focus  def test_method2;         pass;  end
         focus \
         def test_method3;         pass;  end
         def test_method_edgecase; flunk; end
end

describe "MyTest2" do
         it "is ignored"            do flunk end
  focus; it "does something"        do pass  end
  focus  it("does something else")  { pass } # stupid block precedence needs {}
         it "bombs"                 do flunk end
  focus; it "has non-word ['chars'" do pass  end # Will raise invalid RegExp unless correctly escaped
end