Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version 0.4.0.pre1

  • Loading branch information...
commit 3e785cfa989411f854656f8f861e2388e29209ca 1 parent e71e036
@apeiros authored
Showing with 24,420 additions and 1,284 deletions.
  1. +6 −8 .gitignore
  2. +6 −6 LICENSE.txt
  3. +40 −18 MANIFEST.txt
  4. +8 −1 README.rdoc
  5. +1 −0  Rakefile
  6. +126 −118 bin/baretest
  7. +66 −0 dev/CurrentVersion/NEWS.rdoc
  8. +38 −0 dev/CurrentVersion/ToDo.txt
  9. +77 −0 dev/FutureVersion/BetterDetectionOfSource.txt
  10. 0  dev/{Flags.txt → FutureVersion/CommandLineOptions.txt}
  11. +3 −4 dev/{LAYOUT.markdown → FutureVersion/Layout.txt}
  12. +3 −0  dev/FutureVersion/ToDo.txt
  13. 0  dev/{ → FutureVersion}/Variants with Results.txt
  14. 0  dev/{ → FutureVersion}/mockhardening.txt
  15. 0  dev/{ → FutureVersion}/open_questions.txt
  16. 0  dev/{ → FutureVersion}/testdouble.markdown
  17. +13 −0 dev/{ → Implemented/baretest-0.2}/notes.markdown
  18. 0  dev/{ → Implemented/baretest-0.3}/Variants.txt
  19. 0  dev/{ → Implemented/baretest-0.3}/setup_variants.rb
  20. +54 −0 dev/Implemented/baretest-0.4/Status.txt
  21. +35 −16 dev/RoadMap.txt
  22. 0  dev/{ → Workflow}/Rake - Release Project
  23. +0 −80 dev/beat/cleverly-short-test.rb
  24. +0 −406 dev/beat/minitest-unit.rb
  25. +18 −0 dev/doc/Strategies.markdown
  26. +0 −34 dev/features/dependencies/example.rb
  27. +107 −0 doc/announcements/baretest-0.3.0.txt
  28. +8 −0 doc/announcements/structure.txt
  29. +1 −1  doc/baretest.rdoc
  30. +31 −3 doc/mocking_stubbing_test_doubles.rdoc
  31. +7 −0 doc/news/news-0.3.0.rdoc
  32. +74 −28 doc/quickref.rdoc
  33. +5 −0 doc/whats_going_on.rdoc
  34. +25 −13 doc/writing_tests.rdoc
  35. +871 −0 docs/BareTest.html
  36. +758 −0 docs/BareTest/Assertion.html
  37. +295 −0 docs/BareTest/Assertion/Context.html
  38. +209 −0 docs/BareTest/Assertion/Failure.html
  39. +208 −0 docs/BareTest/Assertion/Skip.html
  40. +1,203 −0 docs/BareTest/Assertion/Support.html
  41. +197 −0 docs/BareTest/Assertion/Support/SetupAndTeardown.html
  42. +1,095 −0 docs/BareTest/CommandLine.html
  43. +386 −0 docs/BareTest/Formatter.html
  44. +213 −0 docs/BareTest/IRBMode.html
  45. +879 −0 docs/BareTest/IRBMode/IRBContext.html
  46. +227 −0 docs/BareTest/InvalidSelectors.html
  47. +518 −0 docs/BareTest/Persistence.html
  48. +809 −0 docs/BareTest/Run.html
  49. +199 −0 docs/BareTest/Run/CLI.html
  50. +198 −0 docs/BareTest/Run/Minimal.html
  51. +198 −0 docs/BareTest/Run/None.html
  52. +199 −0 docs/BareTest/Run/Profile.html
  53. +199 −0 docs/BareTest/Run/Spec.html
  54. +200 −0 docs/BareTest/Run/TAP.html
  55. +217 −0 docs/BareTest/Run/XML.html
  56. +478 −0 docs/BareTest/Status.html
  57. +1,398 −0 docs/BareTest/Suite.html
  58. +382 −0 docs/BareTest/UID.html
  59. +330 −0 docs/BareTest/VERSION.html
  60. +371 −0 docs/Command.html
  61. +435 −0 docs/Command/DecoratingHash.html
  62. +1,197 −0 docs/Command/Definition.html
  63. +200 −0 docs/Command/DirectoryNotFoundError.html
  64. +200 −0 docs/Command/FileNotFoundError.html
  65. +200 −0 docs/Command/NoDirectoryError.html
  66. +200 −0 docs/Command/NoFileError.html
  67. +684 −0 docs/Command/Parser.html
  68. +273 −0 docs/Command/VERSION.html
  69. +520 −0 docs/Kernel.html
  70. +196 −0 docs/LICENSE_txt.html
  71. +218 −0 docs/MANIFEST_txt.html
  72. +498 −0 docs/README_rdoc.html
  73. +56 −0 docs/bin/baretest.html
  74. +1 −0  docs/created.rid
  75. +250 −0 docs/doc/baretest_rdoc.html
  76. +178 −0 docs/doc/mocking_stubbing_test_doubles_rdoc.html
  77. +565 −0 docs/doc/quickref_rdoc.html
  78. +187 −0 docs/doc/whats_going_on_rdoc.html
  79. +327 −0 docs/doc/writing_tests_rdoc.html
  80. BIN  docs/images/brick.png
  81. BIN  docs/images/brick_link.png
  82. BIN  docs/images/bug.png
  83. BIN  docs/images/bullet_black.png
  84. BIN  docs/images/bullet_toggle_minus.png
  85. BIN  docs/images/bullet_toggle_plus.png
  86. BIN  docs/images/date.png
  87. BIN  docs/images/find.png
  88. BIN  docs/images/loadingAnimation.gif
  89. BIN  docs/images/macFFBgHack.png
  90. BIN  docs/images/package.png
  91. BIN  docs/images/page_green.png
  92. BIN  docs/images/page_white_text.png
  93. BIN  docs/images/page_white_width.png
  94. BIN  docs/images/plugin.png
  95. BIN  docs/images/ruby.png
  96. BIN  docs/images/tag_green.png
  97. BIN  docs/images/wrench.png
  98. BIN  docs/images/wrench_orange.png
  99. BIN  docs/images/zoom.png
  100. +436 −0 docs/index.html
  101. +116 −0 docs/js/darkfish.js
  102. +32 −0 docs/js/jquery.js
  103. +114 −0 docs/js/quicksearch.js
  104. +10 −0 docs/js/thickbox-compressed.js
  105. +58 −0 docs/lib/baretest/assertion/context_rb.html
  106. +52 −0 docs/lib/baretest/assertion/failure_rb.html
  107. +52 −0 docs/lib/baretest/assertion/skip_rb.html
  108. +58 −0 docs/lib/baretest/assertion/support_rb.html
  109. +60 −0 docs/lib/baretest/assertion_rb.html
  110. +58 −0 docs/lib/baretest/commandline_rb.html
  111. +52 −0 docs/lib/baretest/formatter_rb.html
  112. +52 −0 docs/lib/baretest/invalidselectors_rb.html
  113. +54 −0 docs/lib/baretest/irb_mode_rb.html
  114. +58 −0 docs/lib/baretest/layout_rb.html
  115. +58 −0 docs/lib/baretest/persistence_rb.html
  116. +52 −0 docs/lib/baretest/run/cli_rb.html
  117. +52 −0 docs/lib/baretest/run/minimal_rb.html
  118. +52 −0 docs/lib/baretest/run/none_rb.html
  119. +55 −0 docs/lib/baretest/run/profile_rb.html
  120. +52 −0 docs/lib/baretest/run/spec_rb.html
  121. +52 −0 docs/lib/baretest/run/tap_rb.html
  122. +52 −0 docs/lib/baretest/run/xml_rb.html
  123. +54 −0 docs/lib/baretest/run_rb.html
  124. +52 −0 docs/lib/baretest/safe_rb.html
  125. +52 −0 docs/lib/baretest/setup_rb.html
  126. +52 −0 docs/lib/baretest/status_rb.html
  127. +54 −0 docs/lib/baretest/suite_rb.html
  128. +52 −0 docs/lib/baretest/uid_rb.html
  129. +57 −0 docs/lib/baretest/use/mocha_rb.html
  130. +56 −0 docs/lib/baretest/use/rack_test_rb.html
  131. +57 −0 docs/lib/baretest/use/rr_rb.html
  132. +52 −0 docs/lib/baretest/version_rb.html
  133. +72 −0 docs/lib/baretest_rb.html
  134. +52 −0 docs/lib/command/argument_rb.html
  135. +52 −0 docs/lib/command/decoratinghash_rb.html
  136. +52 −0 docs/lib/command/definition_rb.html
  137. +52 −0 docs/lib/command/directorynotfounderror_rb.html
  138. +52 −0 docs/lib/command/env_rb.html
  139. +52 −0 docs/lib/command/filenotfounderror_rb.html
  140. +52 −0 docs/lib/command/kernel_rb.html
  141. +52 −0 docs/lib/command/nodirectoryerror_rb.html
  142. +52 −0 docs/lib/command/nofileerror_rb.html
  143. +52 −0 docs/lib/command/option_rb.html
  144. +52 −0 docs/lib/command/parser_rb.html
  145. +52 −0 docs/lib/command/result_rb.html
  146. +54 −0 docs/lib/command/types_rb.html
  147. +52 −0 docs/lib/command/version_rb.html
  148. +78 −0 docs/lib/command_rb.html
  149. +52 −0 docs/lib/ruby/kernel_rb.html
  150. +696 −0 docs/rdoc.css
  151. +17 −0 examples/components/rack-test.rb
  152. 0  examples/{tests → }/irb_mode/failures.rb
  153. +40 −0 examples/rake/test.rake
  154. +0 −65 examples/test.rake
  155. +34 −0 examples/tests/01_basics_I.rb
  156. +25 −0 examples/tests/02_basics_II_helpers.rb
  157. +53 −0 examples/tests/03_basics_III_setup_and_teardown.rb
  158. +31 −0 examples/tests/04_advanced_I_dependencies.rb
  159. +12 −0 examples/tests/05_advanced_II_tags.rb
  160. +21 −0 examples/tests/06_advanced_III_requires.rb
  161. +48 −0 examples/tests/07_advanced_IV_components.rb
  162. +46 −0 examples/tests/08_expert_I_setup_variants.rb
  163. 0  examples/tests/mock_developer/test/helper/mocks.rb
  164. +0 −57 examples/tests/mock_developer/test/setup.rb
  165. +0 −19 examples/tests/mock_developer/test/suite/mock_demo.rb
  166. +0 −89 examples/tests/overview/test.rb
  167. +0 −14 examples/tests/variations/variations_01.rb
  168. +0 −19 examples/tests/variations/variations_02.rb
  169. +0 −19 examples/tests/variations/variations_03.rb
  170. +142 −21 lib/baretest.rb
  171. +83 −92 lib/baretest/assertion.rb
  172. +9 −0 lib/baretest/assertion/context.rb
  173. +88 −61 lib/baretest/assertion/support.rb
  174. +268 −0 lib/baretest/commandline.rb
  175. +58 −0 lib/baretest/formatter.rb
  176. +24 −0 lib/baretest/invalidselectors.rb
  177. +100 −58 lib/baretest/irb_mode.rb
  178. +0 −18 lib/baretest/mocha.rb
  179. +94 −0 lib/baretest/persistence.rb
  180. +0 −16 lib/baretest/rr.rb
Sorry, we could not display the entire diff because it was too big.
View
14 .gitignore
@@ -1,10 +1,8 @@
-# We don't care about OS X' littering
-.DS_Store
-._*
-
-# BBedit Projectfile doesn't need versioning
-/baretest.bbprojectd
-
# We don't care about build products
-/docs/*
/pkg/*
+
+# Keeping 'command' gem currently inlined - this task facilitates synchronization
+/rake/tasks/sync.rake
+
+# The locale baretest id is not of interest to others
+/.baretest_id_*
View
12 LICENSE.txt
@@ -11,14 +11,14 @@ below (also known as the 'Ruby License'):
a) place your modifications in the Public Domain or otherwise
make them Freely Available, such as by posting said
- modifications to Usenet or an equivalent medium, or by allowing
- the author to include your modifications in the software.
+ modifications to Usenet or an equivalent medium, or by allowing
+ the author to include your modifications in the software.
b) use the modified software only within your corporation or
organization.
c) rename any non-standard executables so the names do not conflict
- with standard executables, which must also be provided.
+ with standard executables, which must also be provided.
d) make other distribution arrangements with the author.
@@ -26,11 +26,11 @@ below (also known as the 'Ruby License'):
form, provided that you do at least ONE of the following:
a) distribute the executables and library files of the software,
- together with instructions (in the manual page or equivalent)
- on where to get the original distribution.
+ together with instructions (in the manual page or equivalent)
+ on where to get the original distribution.
b) accompany the distribution with the machine-readable source of
- the software.
+ the software.
c) give non-standard executables non-standard names, with
instructions on where to get the original software distribution.
View
58 MANIFEST.txt
@@ -4,49 +4,71 @@ README.rdoc
bin/baretest
doc/baretest.rdoc
doc/mocking_stubbing_test_doubles.rdoc
+doc/news/news-0.3.0.rdoc
doc/quickref.rdoc
doc/whats_going_on.rdoc
doc/writing_tests.rdoc
-examples/test.rake
-examples/tests/irb_mode/failures.rb
-examples/tests/mock_developer/test/helper/mocks.rb
-examples/tests/mock_developer/test/setup.rb
-examples/tests/mock_developer/test/suite/mock_demo.rb
-examples/tests/overview/test.rb
-examples/tests/variations/variations_01.rb
-examples/tests/variations/variations_02.rb
-examples/tests/variations/variations_03.rb
+examples/components/rack-test.rb
+examples/irb_mode/failures.rb
+examples/rake/test.rake
+examples/tests/01_basics_I.rb
+examples/tests/02_basics_II_helpers.rb
+examples/tests/03_basics_III_setup_and_teardown.rb
+examples/tests/04_advanced_I_dependencies.rb
+examples/tests/05_advanced_II_tags.rb
+examples/tests/06_advanced_III_requires.rb
+examples/tests/07_advanced_IV_components.rb
+examples/tests/08_expert_I_setup_variants.rb
lib/baretest.rb
lib/baretest/assertion.rb
lib/baretest/assertion/context.rb
lib/baretest/assertion/failure.rb
lib/baretest/assertion/skip.rb
lib/baretest/assertion/support.rb
+lib/baretest/commandline.rb
+lib/baretest/formatter.rb
+lib/baretest/invalidselectors.rb
lib/baretest/irb_mode.rb
lib/baretest/layout.rb
-lib/baretest/mocha.rb
-lib/baretest/rr.rb
+lib/baretest/persistence.rb
lib/baretest/run.rb
lib/baretest/run/cli.rb
-lib/baretest/run/errors.rb
lib/baretest/run/minimal.rb
+lib/baretest/run/none.rb
lib/baretest/run/profile.rb
lib/baretest/run/spec.rb
lib/baretest/run/tap.rb
lib/baretest/run/xml.rb
lib/baretest/setup.rb
-lib/baretest/skipped.rb
-lib/baretest/skipped/assertion.rb
-lib/baretest/skipped/suite.rb
+lib/baretest/status.rb
lib/baretest/suite.rb
+lib/baretest/uid.rb
+lib/baretest/use/mocha.rb
+lib/baretest/use/rack_test.rb
+lib/baretest/use/rr.rb
lib/baretest/version.rb
+lib/command.rb
+lib/command/argument.rb
+lib/command/decoratinghash.rb
+lib/command/definition.rb
+lib/command/directorynotfounderror.rb
+lib/command/env.rb
+lib/command/filenotfounderror.rb
+lib/command/kernel.rb
+lib/command/nodirectoryerror.rb
+lib/command/nofileerror.rb
+lib/command/option.rb
+lib/command/parser.rb
+lib/command/result.rb
+lib/command/types.rb
+lib/command/version.rb
lib/ruby/kernel.rb
-test/external/bootstraptest.rb
-test/external/bootstrapwrap.rb
-test/helper/mocks.rb
test/setup.rb
test/suite/lib/baretest.rb
test/suite/lib/baretest/assertion.rb
+test/suite/lib/baretest/assertion/context.rb
+test/suite/lib/baretest/assertion/failure.rb
+test/suite/lib/baretest/assertion/skip.rb
test/suite/lib/baretest/assertion/support.rb
test/suite/lib/baretest/irb_mode.rb
test/suite/lib/baretest/run.rb
View
9 README.rdoc
@@ -1,4 +1,4 @@
-= Bare Test
+= BareTest
@@ -6,6 +6,8 @@
A testframework that doesn't stand in your way or forces you to learn a new
language. Two methods is all that is required to know.
+If you need it, it provides you with all kinds of features to support you
+writing your tests.
@@ -70,6 +72,11 @@ To get baretest edge, use:
2. Change into the baretest directory: `cd the/baretest/directory`
3. Run the installation task: `rake gem:install` (alternatively `rake install:lib`)
+IMPORTANT: if the gem:install task fails, it might be because I forgot to update
+the MANIFEST.txt. Simply delete MANIFEST.txt, then run `rake manifest:create`
+and then retry `rake gem:install`.
+Also notice that you should have the gems 'nokogiri' and 'rdoc' installed.
+
If you have multiple ruby versions installed parallely, this might pick the wrong gem
executable to install the gem. You can set the GEM env variable to ensure it uses the
right one: `rake gem:install GEM=gem1.9`
View
1  Rakefile
@@ -26,6 +26,7 @@ Project.manifest.ignore = %w[
dev/**/*
doc/announcements/**/*
docs/**/*
+ lib/baretest/safe.rb
pkg/**/*
rake/**/*
web/**/*
View
244 bin/baretest
@@ -8,143 +8,151 @@
-Version = "0.3.2"
+Version = "0.4.0" # Executable version
+# assume baretest is not installed and this is a cold-run from source
+lib_dir = File.expand_path("#{__FILE__}/../../lib")
+$LOAD_PATH.unshift(lib_dir) if File.directory?(lib_dir)
+lib_dir = File.expand_path("#{__FILE__}/../../../command/lib")
+$LOAD_PATH.unshift(lib_dir) if File.directory?(lib_dir)
-require 'optparse'
-begin
- # if baretest is installed as a gem, the executable is be wrapped by rubgems anyway, so we don't
- # need to require rubygems ourself.
- require 'baretest'
-rescue LoadError
- # assume baretest is not installed and this is a cold-run from source
- $LOAD_PATH.unshift(File.expand_path("#{__FILE__}/../../lib"))
- require 'baretest'
-end
+require 'command'
+require 'baretest'
-# Get all the command-line arguments and adapt options to it
-format = ENV['FORMAT'] || 'cli'
-interactive = ['false', nil].include?(ENV['INTERACTIVE']) ? false : true
-setup_path = nil
-
-opts = OptionParser.new("", 24, ' ') do |opts|
- opts.banner = "Usage: baretest [options] [glob, ...]"
-
- opts.separator "Glob defaults to 'test/{suite,unit,integration,system}/**/*.rb'"
- opts.separator "Providing a directory as glob is equivalent to dir/**/*.rb\n"
- opts.separator "Options:"
-
- opts.on(nil, "--init", "create the necessary directories and files") {
- core = %w[
- test
- test/external
- test/helper
- test/helper/suite
- test/suite
- ]
- mirror = {
- 'bin' => %w[test/helper/suite test/suite],
- 'lib' => %w[test/helper/suite test/suite],
- 'rake' => %w[test/helper/suite test/suite],
- }
- files = {
- 'test/setup.rb' => <<-END_OF_SETUP.gsub(/^ {8}/, '')
- $LOAD_PATH.unshift(File.expand_path("\#{__FILE__}/../../lib")) # Add PROJECT/lib to $LOAD_PATH
- END_OF_SETUP
- }
-
- puts "Creating all directories and files needed in #{File.expand_path('.')}"
- core.each do |dir|
- if File.exist?(dir) then
- puts "Directory #{dir} exists already -- skipping"
- else
- puts "Creating #{dir}"
- Dir.mkdir(dir)
- end
- end
- mirror.each do |path, destinations|
- if File.exist?(path) then
- destinations.each do |destination|
- destination = File.join(destination,path)
- if File.exist?(destination) then
- puts "Mirror #{destination} of #{path} exists already -- skipping"
- else
- puts "Mirroring #{path} in #{destination}"
- Dir.mkdir(destination)
- end
- end
- end
- end
- files.each do |path, data|
- if File.exist?(path) then
- puts "File #{path} exists already -- skipping"
- else
- puts "Writing #{path}"
- File.open(path, 'wb') do |fh|
- fh.write(data)
- end
- end
- end
- exit
- }
+# Specify commands and options
+Command "run" do
+ # global arguments
+ virtual_argument :command, '[command]', "The command to run. See `baretest commands`"
+ virtual_argument :options, '[options]', "The flags and options, see in the \"Options\" section."
- opts.on("-f", "--format FORMAT", "use FORMAT for output") { |use|
- format = use
- }
+ # global options
+ o :commands, nil, '--commands', :Boolean, "overview over the commands"
+ o :help, '-h', '--help', :Boolean, "help for usage and flags"
+ o :version, '-v', '--version', :Boolean, "print the version and exit"
+ o :init, nil, '--init', "Deprecated form for `baretest --init`"
- opts.on("-F", "--formats", "show available formats") { |use|
- puts "Available formats:"
- Dir.glob("{#{$LOAD_PATH.join(',')}}/baretest/run/*.rb") { |path|
- puts "- #{File.basename(path, '.rb')}"
- }
- exit
- }
+ # specify the 'run' command, its default options, its options and helptext
+ command "run", :format => 'cli', :interactive => false, :verbose => false do
+ usage
- opts.on("-d", "--debug", "set debugging flags (set $DEBUG to true)") {
- $DEBUG = true
- $VERBOSE = true
- }
+ virtual_argument :command
+ virtual_argument :options
+ virtual_argument :selector, '*(selector | -selector)', :String,
+ "The tests to run. Example:\n" \
+ " baretest -- test/suite/a -test/suite/a/x @tag -@other %failure -%pending\n" \
+ "Defaults to 'test/{suite,unit,integration,system}\n" \
+ "See `baretest selectors` to get more information"
- opts.on("-i", "--interactive", "drop into IRB on error or failure") {
- interactive = true
- }
+ text "\nDefault command is 'run', which runs the testsuite or the provided testfiles.\n\nOptions:\n"
- opts.on("-s", "--setup FILE", "specify setup file") { |path|
- setup_path = path
- }
+ o :commands
+ o :debug, '-d', '--debug', :Boolean, "set debugging flags (set $DEBUG to true)"
+ o :interactive, '-i', '--interactive', :Boolean, "drop into IRB on error or failure"
+ o :format, '-f', '--format FORMAT', :String, "use FORMAT for output, see `baretest formats`"
+ o :setup_file, '-s', '--setup FILE', :File, "specify setup file"
+ o :verbose, '-w', '--warn', :Boolean, "turn warnings on for your script"
+ o :help
+ o :version
+ o :init
- opts.on("-v", "--version", "print the version and exit") {
- puts "baretest executable version #{Version}, library version #{BareTest::VERSION}"
- exit
- }
+ text ""
- opts.on("-w", "--warn", "turn warnings on for your script") {
- $VERBOSE = true
- }
+ placeholder :format_options
- opts.parse! ARGV
-end
+ text "\nEnvironment variables:\n"
+
+ env_option :format, 'FORMAT'
+ env_option :verbose, 'VERBOSE'
+ env_option :interactive, 'INTERACTIVE'
+ end
+
+ command "init" do
+ usage
+ virtual_argument :command
+ virtual_argument :options
+ text "\n Create the necessary directories and files"
+ o :help
+ end
-# Load the setup file, all helper files and all test files
-BareTest.load_standard_test_files(
- :verbose => $VERBOSE,
- :setup_path => setup_path,
- :files => (ARGV.empty? ? nil : ARGV),
- :chdir => '.'
-)
+ command "formats"
+ command "env"
+ command "version"
+ command "commands"
+ command "selectors"
+ command "help"
+end
-# Run the tests
-puts if $VERBOSE
-if BareTest.run(:format => format, :interactive => interactive).global_status == :success then
- exit 0
-else
- exit 1
+# Execute command
+Command.with(ARGV) do
+ # parse out the command
+ command = command!
+ # parse all options we know about and leave alone those we don't
+ options = options! :ignore_invalid_options
+
+ # some options are equivalent to commands - if they are set, change the
+ # command
+ if set = [:help, :commands, :version].find { |flag| options[flag] } then
+ run_command = set.to_s
+ elsif options[:init]
+ abort "`#{$0} --init` is depreciated, please use `baretest init`."
+ else
+ run_command = command
+ end
+ if %w[run help].include?(command) then
+ formatter = BareTest::CommandLine.load_formatter(options[:format])
+
+ definition[command].content_for :format_options do |d|
+ if formatter.is_a?(BareTest::Formatter) then
+ d.default_options.update(formatter.command[:option_defaults]) do |k,v1,v2| v2 end
+ formatter.command[:elements].each do |key, args|
+ d.send(key, *args)
+ end
+ else
+ d.text "Formatter '#{options[:format]}' does not specify any custom options."
+ end
+ end
+ end
+
+ options = options! # reparse with new information
+
+ case run_command
+ when "run" # run the testsuite/-file
+ begin
+ success = BareTest::CommandLine.run(arguments, options)
+ rescue BareTest::InvalidSelectors => e
+ puts e
+ puts "Valid state selectors are: #{BareTest::ValidStateSelectors.join(', ')}"
+ success = false
+ end
+ exit(success ? 0 : 1)
+ when "init" # create the test directory
+ BareTest::CommandLine.init(arguments, options)
+ when "formats" # list available formats
+ BareTest::CommandLine.formats(arguments, options)
+ when "env" # show information about baretest (config, version, paths, ...)
+ BareTest::CommandLine.env(arguments, options)
+ when "version" # show version information about baretest
+ BareTest::CommandLine.version(arguments, options)
+ when "selectors" # show version information about selectors baretest recognizes
+ BareTest::CommandLine.selectors(arguments, options)
+ when "help"
+ if command == 'help' then
+ BareTest::CommandLine.help(arguments, options)
+ else
+ puts definition[command].usage_text
+ end
+ when "commands"
+ BareTest::CommandLine.commands(arguments, options)
+ else
+ puts "Unknown command '#{command}'"
+ BareTest::CommandLine.commands(arguments, options)
+ end
end
View
66 dev/CurrentVersion/NEWS.rdoc
@@ -0,0 +1,66 @@
+NEWS Version 0.3 (rolled into 0.4)
+* Setup-variations
+ See examples/tests/08_expert_I_setup_variants.rb for more examples.
+ Example:
+ suite "Variations - Notation II" do
+ setup :number, %w[123 -123 1.23 -1.23 1e3 -1e3 1e-3 -1e-3] do |number|
+ @number = number
+ end
+
+ # This assertion will be run 8 times with a different value and
+ # description each time
+ assert ":number should be a numeric" do
+ @number.numeric?
+ end
+ end
+
+* Suite/Assertion :skip => true/reason, skip-method and Skip exception
+ You can now manually skip a suite by either providing ':skip => true' or
+ 'skip => "skip reason"' in the suite options, by invoking Suite#skip or by
+ raising a Baretest::Assertion::Skip exception. The same works for Assertions.
+
+* Formatter specific options
+ Each formatter can now define options specific to it. This is useful e.g. to
+ create formatters that are more configurable (e.g. several formatters might
+ have a use for --[no-]color, while that makes no sense for others)
+
+* Data persistence to retain run statistics and other information in ~/.baretest
+
+
+
+NEWS Version 0.4
+* Components via BareTest.new_component, :use and :fake
+ Example:
+ suite "Rack Integration Test", :use => :rack_test do ... end
+ suite "FileUtils Test", :fake => :file_system do ... end
+ # `:fake => :file_system` does not yet exist, but might one day via FakeFS
+
+* Inter-Test-Dependencies via :provides & :depends_on
+ Example:
+ suite "Integer Addition", :provides => :integer_addition do ... end
+ suite "Integer Multiplication", :depends_on => :integer_addition do ... end
+
+* Selectors in the baretest executable, supporting globs, tags and
+ last-run-status.
+ Important: All negative selectors must be placed after the '--' argument, as
+ otherwise they'll be interpreted as options. This may be resolved in a future
+ release.
+ See `baretest selectors` for an overview on selectors
+ Example:
+ # Load only files matching this glob:
+ baretest test/suite/lib/somelib/**/* # test/suite/lib/somelib would do the same
+ # Exclude some files via glob:
+ baretest -- -test/suite/lib/somelib/**/*.rb
+ # Only run suites tagged with :focus (suite "Foo", :tags => :focus)
+ baretest :focus
+ # Only run suites that are NOT tagged with :pocus
+ baretest -- -:pocus
+ # Only run tests that have failed in the last run
+ baretest %failure
+ # Don't run tests that succeeded in the last run
+ baretest -%success
+ # Combine it all
+ baretest -- test/suite/lib/somelib -test/suite/lib/somelib/foo :focus -:pocus %failure -%success
+
+* rack-test Integration via :rack_test component (suite "Foo", :use => :rack_test)
+ See http://github.com/brynary/rack-test for information on rack_test.
View
38 dev/CurrentVersion/ToDo.txt
@@ -0,0 +1,38 @@
+BUGS:
+* Correct skip reason must be implemented.
+* load helpers when specifying custom globs
+ - look for (?:\A|/)test/ and replace with test/helpers
+
+
+CHORES:
+* Verify that persistence works as expected no matter from where baretest is run
+ and with what glob.
+* Go over persistence coupling in Run
+* Make baretest recognize invalid options '-:' and '-%' as selectors
+* Examples for BareTest::Assertion::Support
+* Document setup variants. Reference that documentation in relevant methods like
+ Assertion#interpolated_description, Suite#component_variant_count,
+ #each_component_variant, #first_component_variant
+
+* Make Assertion::Support become a component, that is added to toplevel suite
+ in setup.rb per default.
+
+MISSING TESTS:
+
+support.rb:
+ module BareTest
+ def self.touch(assertion, thing=nil) # :nodoc:
+ def self.touched(assertion, thing=nil) # :nodoc:
+ def self.clean_touches(assertion) # :nodoc:
+
+ module Support
+ def throws_nothing # :nodoc:
+ def not_touched(thing=nil)
+ def extract_args(args, *named)
+
+ suite "#verify_dependencies!" do
+ assert "Should not make the suite skipped if it depends_on nothing"
+ assert "Should not make the suite skipped if everything it depends_on is provided"
+ assert "Should not make the suite skipped if more than everything it depends_on is provided"
+ assert "Should make the suite skipped if not everything it depends_on is provided"
+ end
View
77 dev/FutureVersion/BetterDetectionOfSource.txt
@@ -0,0 +1,77 @@
+Use set_trace_func to better detect the source of an assertion.
+Overhead for setting the trace func: ~0.02ms per set/unset
+
+set_trace_func(proc { |event, file, line, id, binding, classname| ... })
+
+starting an assertion:
+ {
+ file = one of the test-suite files
+ event = "line"
+ }
+ immediatly followed by
+ {
+ id = :assert
+ classname = BareTest::Suite (actual class)
+ }
+ -> store file in open_assertion
+
+ending an assertion
+ {
+ file = open_assertion
+ }
+ scan up in source until we hit the 'end' token
+ important! the assertion might be ended by starting a new assertion
+
+
+Below code generally works but is slightly buggy and has weaknesses:
+* does not account for # or =begin/=end comments
+* does not account for literals containing 'end' ("this is the end")
+* does not account for 'end's comming from another kind of nesting
+
+sources = []
+code = []
+last_file = nil
+last_line = nil
+assertion_file = nil
+assertion_line = nil
+cache = {}
+set_trace_func(proc { |event, file, line, id, binding, classname|
+ if assertion_file then
+ last_file = file
+ last_line = line
+ if assertion_file == file then
+ if line == assertion_line then
+ raise "You're an idiot, don't use ; in your testcode."
+ else
+ current = cache[file]
+ line -= 1
+ until (current[line] =~ /\bend\b/) || (line <= assertion_line)
+ p current[line]
+ line -= 1
+ end
+ sources << [assertion_file, assertion_line, line+1]
+ code << current[(assertion_line-1)..(line)].join("")
+ end
+ assertion_file = nil
+ end
+ elsif id == :assert && classname == BareTest::Suite then
+ assertion_file = last_file
+ assertion_line = last_line
+ cache[assertion_file] ||= File.readlines(assertion_file)
+ else
+ last_file = file
+ last_line = line
+ end
+})
+
+--------------------------------------------------------------------------------
+ dotted = false
+ set_trace_func(proc { |event, file, line, id, binding, classname|
+ if file == '/Users/Shared/Development/Gems/baretest/assertions.rb' || id == :assert then
+ printf "event: %p file: %s:%-2d id: %p classname: %p\n", event, file, line, id, classname
+ dotted = false
+ else
+ puts "." unless dotted
+ dotted = true
+ end
+ })
View
0  dev/Flags.txt → dev/FutureVersion/CommandLineOptions.txt
File renamed without changes
View
7 dev/LAYOUT.markdown → dev/FutureVersion/Layout.txt
@@ -23,11 +23,10 @@ The following is the standard layout:
* helper: files that are needed to support your tests.
The path is available via Test.layout.helper.
* suite: the directory for your assertions, this directory rebuilds the structure of the
- project-directory, basically unit, integration and system unified.
- * unit: Where you put your unit tests, same like suite.
+ project-directory, basically isolation, integration and system unified.
+ * isolation: Where you put your isolation tests, same like suite.
* integration: Where you put your integration tests, same like suite.
* system: Where you put your system tests, same like suite.
* setup.rb: this file is automatically required prior to loading all tests.
* teardown.rb: this file is automatically required after all tests are run.
-
-All other
+ * unit: alternative name for 'isolation'.
View
3  dev/FutureVersion/ToDo.txt
@@ -0,0 +1,3 @@
+BUGS:
+* :requires should execute the requires upon execution instead of upon
+ definition
View
0  dev/Variants with Results.txt → dev/FutureVersion/Variants with Results.txt
File renamed without changes
View
0  dev/mockhardening.txt → dev/FutureVersion/mockhardening.txt
File renamed without changes
View
0  dev/open_questions.txt → dev/FutureVersion/open_questions.txt
File renamed without changes
View
0  dev/testdouble.markdown → dev/FutureVersion/testdouble.markdown
File renamed without changes
View
13 dev/notes.markdown → dev/Implemented/baretest-0.2/notes.markdown
@@ -38,3 +38,16 @@ Interactive Formatter
That way the code piece that failed could be displayed (trimmed and unindented
text between line of definition of the current assertion and line of
definition of closest assertion/suite/eof)
+
+
+
+Rationales
+----------
+
+Q: Why is persistence data stored in ~/.baretest rathern than within the test
+ directory?
+A: Test run data is something that is machine bound. If many sources access
+ the same test directory, they should still keep their separate persistence
+ data.
+ It might be that I enable choosing between project-resident and user-
+ resident.
View
0  dev/Variants.txt → dev/Implemented/baretest-0.3/Variants.txt
File renamed without changes
View
0  dev/setup_variants.rb → ...mplemented/baretest-0.3/setup_variants.rb
File renamed without changes
View
54 dev/Implemented/baretest-0.4/Status.txt
@@ -0,0 +1,54 @@
+Skipping, possible reasons for a suite to be skipped:
+1. Implementation pending
+ An assertion with no block given
+ `assert "Something"`
+2. Manual skip
+ A suite with the option `:skip => true/reason`
+ `suite "Foo", :skip => "Depends on Feature #37" do ... end`
+3. Dependency missing
+ A suite with the option `:depends_on => :something` where :something
+ was not provided by another suite
+ `suite "Foo", :depends_on => :something do ... end`
+4. Library missing
+ A suite with the option `:requires => 'some/lib` where some/lib
+ could not be required.
+ `suite "Foo", :requires => 'not/installed/lib' do ... end`
+5. Component missing
+ A suite with the option `:use => :some_component` where :some_component
+ is not available.
+ `suite "Foo", :use => :some_component do ... end`
+6. Required Tag missing -> :tags => ...
+7. Excluded Tag present -> :tags => ...
+8. Status mismatch -> <last run status>
+
+
+Inheritance
+ Of which the following are inherited:
+ 1, 2, 3, 4, 5
+
+ And the following shallow:
+ 6,7,8,9
+
+Recording
+ Of which the following are recorded
+ 1, 2, 3, 4, 5
+
+ And the following ignored
+ 6,7,8
+
+States
+:pending: 1
+:skipped
+ :manually_skipped: 2
+ :dependency_missing: 3
+ :library_missing 4
+ :component_missing: 5
+:ignored:
+ :included_tag_missing: 6
+ :excluded_tag_present: 7
+ :status_mismatch: 8
+
+:pending, :dependency_missing, :library_missing and :component_missing are
+a subset of :failure.
+
+:error, :failure, :pending, :manually_skipped, :dependency_missing, :library_missing, :component_missing, :ignored, :success
View
51 dev/RoadMap.txt
@@ -1,22 +1,35 @@
-VERSIONS:
-0.3:
- * setup-variations (done)
- * skip-method and Skip < StandardError (done)
- * ~/.baretestrc
- * configuration system
- * formatter specific options
-
-0.4:
- * continuous testing on OS X (fsevents+growl)
- * full ruby-debug integration
- * full ir integration
- * tag/focus
-
0.5:
- * forked suite execution
+ * forked suite execution - auto-isolation
+ * forked suite execution - parallel execution
0.6:
+ * website integration teststack for rack based frameworks
+ - check all links
+ - check html syntax
+ - check javascript syntax
+ - check css syntax
+ - check css for browser compatibility
+ - check presence of expected elements
+ - check behaviour (e.g. click on element X hides element Y), including
+ javascript enabled behaviour
* rails integration (controllers, models, views, helpers)
+ * full ruby-debug integration
+ * full rcov integration
+
+0.7:
+ * continuous testing on OS X (fsevents+growl)
+ * daemon mode for baretest, reload changed files
+
+0.8:
+ * dependency resolving for :provides & :depends_on
+ * full ir integration
+
+0.9:
+ * Correct self-test suite with proper isolation of bootstrapping
+ * Implement test-layouts
+
+1.0:
+ * Polish, polish, polish
PROGRESSIVE
* TestGuide - How to use BareTest
@@ -30,4 +43,10 @@ UNASSIGNED
* assert_flow - for complex unit tests where reaching a certain state
takes a lot of time and successive asserts depend on previous ones
abort flow assertion upon first failure.
-* auto-require corresponding lib-files
+* auto-require corresponding lib-files
+* guard assertions - sometimes we make assumptions in our tests, guard
+ assertions let us test those assumptions
+
+REJECTED
+* configuration system
+ -> Configure what and why?
View
0  dev/Rake - Release Project → dev/Workflow/Rake - Release Project
File renamed without changes
View
80 dev/beat/cleverly-short-test.rb
@@ -1,80 +0,0 @@
-require 'test/support'
-module Test
- @extender, @mock_adapter = {}, nil
- class <<self
- attr_reader :extender, :mock_adapter, :run
- end
- def self.run_if_mainfile(&block)
- (@run ||= Run.new).suite.instance_eval(&block)
- return unless caller.first[/^[^:]*/] == $0
- @run.run(ENV['FORMAT'] || 'cli')
- end
- class Run
- attr_reader :suite
- def initialize() @suite = Suite.new end
- def run(runner, count=Hash.new(0))
- require "test/run/#{runner}"
- extend(Test.extender["test/run/#{runner}"])
- extend(Test.mock_adapter) if Test.mock_adapter
- @count = count
- run_all(@suite) do |main_suite| run_suite(main_suite) end
- end
- def run_all(suites) yield(suites) end
- def run_suite(suite)
- suite.tests.each{ |test| run_test(test){ |assertion| assertion.execute }}
- suite.suites.each do |suite| run_suite(suite) end
- @count[:suite] += 1
- end
- def run_test(assertion)
- yield(assertion)
- @count[:test] += 1
- @count[assertion.status] += 1
- end
- end
- class Suite
- attr_reader :suites, :tests, :name, :parent, :ancestors
- def initialize(name=nil, parent=nil, &block)
- @name,@parent,@suites,@tests,@setup,@teardown,@ancestors = name,parent,[],[],[],[],([self]+(@parent ? @parent.ancestors : []))
- instance_eval(&block) if block
- end
- def suite(name=nil, opts={}, &block)
- begin
- Array(opts[:requires]).each { |file| require file } if opts[:requires]
- rescue LoadError
- @suites << suite = Skipped::Suite.new(name, self)
- else
- @suites << suite = (block ? self.class : Skipped::Suite).new(name, self)
- end
- suite.instance_eval(&block)
- end
- def setup(&block) block ? @setup << block : @setup end
- def teardown(&block) block ? @teardown << block : @teardown end
- def assert(message=nil, &block) @tests << Assertion.new(self, message, &block) end
- end
- class Assertion
- attr_reader :status, :exception, :message
- def initialize(suite, message, &block) @suite,@status,@exception,@message,@block = suite,nil,nil,(message || "No message given"),block end
- def execute
- @exception = nil
- if @block then
- @suite.ancestors.map { |suite| suite.setup }.flatten.reverse.each { |setup| instance_eval(&setup) }
- @status = instance_eval(&@block) ? :success : :failure
- @suite.ancestors.map { |suite| suite.teardown }.flatten.each { |setup| instance_eval(&setup) }
- else @status = :pending end
- rescue => e
- @exception, @status = e, :error
- self
- else self end
- end
- module Skipped
- class Suite < ::Test::Suite
- def assert(message=nil, &block) @tests << Skipped::Assertion.new(self, message, &block) end
- def setup(&block) [] end
- def teardown(&block) [] end
- end
- class Assertion < ::Test::Assertion
- def execute() @status = :skipped and self end
- end
- end
- @main_suite = Suite.new
-end
View
406 dev/beat/minitest-unit.rb
@@ -1,406 +0,0 @@
-module MiniTest
- class Assertion < Exception; end
- class Skip < Assertion; end
- file = if RUBY_VERSION =~ /^1\.9/ then # bt's expanded, but __FILE__ isn't :(
- File.expand_path __FILE__
- elsif __FILE__ =~ /^[^\.]/ then # assume both relative
- require 'pathname'
- pwd = Pathname.new Dir.pwd
- pn = Pathname.new File.expand_path(__FILE__)
- pn = File.join(".", pn.relative_path_from(pwd)) unless pn.relative?
- pn.to_s
- else # assume both are expanded
- __FILE__
- end
- MINI_DIR = File.dirname(File.dirname(file))
- def self.filter_backtrace bt
- return ["No backtrace"] unless bt
- new_bt = []
- bt.each do |line|
- break if line.rindex(MINI_DIR, 0)
- new_bt << line
- end
- new_bt = bt.reject { |line| line.rindex(MINI_DIR, 0) } if new_bt.empty?
- new_bt = bt.dup if new_bt.empty?
- new_bt
- end
- module Assertions
- def mu_pp(obj)
- s = obj.inspect
- s = s.force_encoding(Encoding.default_external) if defined? Encoding
- s
- end
- def _assertions= n
- @_assertions = n
- end
- def _assertions
- @_assertions ||= 0
- end
- def assert test, msg = nil
- msg ||= "Failed assertion, no message given."
- self._assertions += 1
- unless test then
- msg = msg.call if Proc === msg
- raise MiniTest::Assertion, msg
- end
- true
- end
- def assert_block msg = nil
- msg = message(msg) { "Expected block to return true value" }
- assert yield, msg
- end
- def assert_empty obj, msg = nil
- msg = message(msg) { "Expected #{obj.inspect} to be empty" }
- assert_respond_to obj, :empty?
- assert obj.empty?, msg
- end
- def assert_equal exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(exp)}, not #{mu_pp(act)}" }
- assert(exp == act, msg)
- end
- def assert_in_delta exp, act, delta = 0.001, msg = nil
- n = (exp - act).abs
- msg = message(msg) { "Expected #{exp} - #{act} (#{n}) to be < #{delta}" }
- assert delta >= n, msg
- end
- def assert_in_epsilon a, b, epsilon = 0.001, msg = nil
- assert_in_delta a, b, [a, b].min * epsilon, msg
- end
- def assert_includes collection, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(collection)} to include #{mu_pp(obj)}" }
- flip = (obj.respond_to? :include?) && ! (collection.respond_to? :include?) # HACK for specs
- obj, collection = collection, obj if flip
- assert_respond_to collection, :include?
- assert collection.include?(obj), msg
- end
- def assert_instance_of cls, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to be an instance of #{cls}, not #{obj.class}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
- assert obj.instance_of?(cls), msg
- end
- def assert_kind_of cls, obj, msg = nil # TODO: merge with instance_of
- msg = message(msg) {
- "Expected #{mu_pp(obj)} to be a kind of #{cls}, not #{obj.class}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
- assert obj.kind_of?(cls), msg
- end
- def assert_match exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(exp)} to match #{mu_pp(act)}" }
- assert_respond_to act, :"=~"
- exp = /#{Regexp.escape(exp)}/ if String === exp && String === act
- assert exp =~ act, msg
- end
- def assert_nil obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to be nil" }
- assert obj.nil?, msg
- end
- def assert_operator o1, op, o2, msg = nil
- msg = message(msg) { "Expected #{mu_pp(o1)} to be #{op} #{mu_pp(o2)}" }
- assert o1.__send__(op, o2), msg
- end
- def assert_raises *exp
- msg = String === exp.last ? exp.pop : nil
- should_raise = false
- begin
- yield
- should_raise = true
- rescue Exception => e
- assert(exp.any? { |ex|
- ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class
- }, exception_details(e, "#{mu_pp(exp)} exception expected, not"))
-
- return e
- end
- exp = exp.first if exp.size == 1
- flunk "#{mu_pp(exp)} expected but nothing was raised." if should_raise
- end
- def assert_respond_to obj, meth, msg = nil
- msg = message(msg) {
- "Expected #{mu_pp(obj)} (#{obj.class}) to respond to ##{meth}"
- }
- flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs
- obj, meth = meth, obj if flip
- assert obj.respond_to?(meth), msg
- end
- def assert_same exp, act, msg = nil
- msg = message(msg) {
- data = [mu_pp(act), act.object_id, mu_pp(exp), exp.object_id]
- "Expected %s (0x%x) to be the same as %s (0x%x)" % data
- }
- assert exp.equal?(act), msg
- end
- def assert_send send_ary, m = nil
- recv, msg, *args = send_ary
- m = message(m) {
- "Expected #{mu_pp(recv)}.#{msg}(*#{mu_pp(args)}) to return true" }
- assert recv.__send__(msg, *args), m
- end
- def assert_throws sym, msg = nil
- default = "Expected #{mu_pp(sym)} to have been thrown"
- caught = true
- catch(sym) do
- begin
- yield
- rescue ArgumentError => e # 1.9 exception
- default += ", not #{e.message.split(/ /).last}"
- rescue NameError => e # 1.8 exception
- default += ", not #{e.name.inspect}"
- end
- caught = false
- end
-
- assert caught, message(msg) { default }
- end
- def capture_io
- require 'stringio'
-
- orig_stdout, orig_stderr = $stdout, $stderr
- captured_stdout, captured_stderr = StringIO.new, StringIO.new
- $stdout, $stderr = captured_stdout, captured_stderr
-
- yield
-
- return captured_stdout.string, captured_stderr.string
- ensure
- $stdout = orig_stdout
- $stderr = orig_stderr
- end
- def exception_details e, msg
- "#{msg}\nClass: <#{e.class}>\nMessage: <#{e.message.inspect}>\n---Backtrace---\n#{MiniTest::filter_backtrace(e.backtrace).join("\n")}\n---------------"
- end
- def flunk msg = nil
- msg ||= "Epic Fail!"
- assert false, msg
- end
- def message msg = nil, &default
- proc {
- if msg then
- msg = msg.to_s unless String === msg
- msg += '.' unless msg.empty?
- msg += "\n#{default.call}."
- msg.strip
- else
- "#{default.call}."
- end
- }
- end
- # used for counting assertions
- def pass msg = nil
- assert true
- end
- def refute test, msg = nil
- msg ||= "Failed refutation, no message given"
- not assert(! test, msg)
- end
- def refute_empty obj, msg = nil
- msg = message(msg) { "Expected #{obj.inspect} to not be empty" }
- assert_respond_to obj, :empty?
- refute obj.empty?, msg
- end
- def refute_equal exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not be equal to #{mu_pp(exp)}" }
- refute exp == act, msg
- end
- def refute_in_delta exp, act, delta = 0.001, msg = nil
- n = (exp - act).abs
- msg = message(msg) { "Expected #{exp} - #{act} (#{n}) to not be < #{delta}" }
- refute delta > n, msg
- end
- def refute_in_epsilon a, b, epsilon = 0.001, msg = nil
- refute_in_delta a, b, a * epsilon, msg
- end
- def refute_includes collection, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(collection)} to not include #{mu_pp(obj)}" }
- flip = (obj.respond_to? :include?) && ! (collection.respond_to? :include?) # HACK for specs
- obj, collection = collection, obj if flip
- assert_respond_to collection, :include?
- refute collection.include?(obj), msg
- end
- def refute_instance_of cls, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be an instance of #{cls}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
- refute obj.instance_of?(cls), msg
- end
- def refute_kind_of cls, obj, msg = nil # TODO: merge with instance_of
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be a kind of #{cls}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
- refute obj.kind_of?(cls), msg
- end
- def refute_match exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(exp)} to not match #{mu_pp(act)}" }
- assert_respond_to act, :"=~"
- exp = /#{Regexp.escape(exp)}/ if String === exp && String === act
- refute exp =~ act, msg
- end
- def refute_nil obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be nil" }
- refute obj.nil?, msg
- end
- def refute_operator o1, op, o2, msg = nil
- msg = message(msg) { "Expected #{mu_pp(o1)} to not be #{op} #{mu_pp(o2)}" }
- refute o1.__send__(op, o2), msg
- end
- def refute_respond_to obj, meth, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not respond to #{meth}" }
- flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs
- obj, meth = meth, obj if flip
- refute obj.respond_to?(meth), msg
- end
- def refute_same exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not be the same as #{mu_pp(exp)}" }
- refute exp.equal?(act), msg
- end
- def skip msg = nil, bt = caller
- msg ||= "Skipped, no message given"
- raise MiniTest::Skip, msg, bt
- end
- end
- class Unit
- VERSION = "1.3.1"
- attr_accessor :report, :failures, :errors, :skips
- attr_accessor :test_count, :assertion_count
- @@installed_at_exit ||= false
- @@out = $stdout
- def self.autorun
- at_exit {
- next if $! # don't run if there was an exception
- exit_code = MiniTest::Unit.new.run(ARGV)
- exit false if exit_code && exit_code != 0
- } unless @@installed_at_exit
- @@installed_at_exit = true
- end
- def self.output= stream
- @@out = stream
- end
- def location e
- last_before_assertion = ""
- e.backtrace.reverse_each do |s|
- break if s =~ /in .(assert|refute|flunk|pass|fail|raise)/
- last_before_assertion = s
- end
- last_before_assertion.sub(/:in .*$/, '')
- end
- def puke klass, meth, e
- e = case e
- when MiniTest::Skip then
- @skips += 1
- "Skipped:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
- when MiniTest::Assertion then
- @failures += 1
- "Failure:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
- else
- @errors += 1
- bt = MiniTest::filter_backtrace(e.backtrace).join("\n ")
- "Error:\n#{meth}(#{klass}):\n#{e.class}: #{e.message}\n #{bt}\n"
- end
- @report << e
- e[0, 1]
- end
- def initialize
- @report = []
- @errors = @failures = @skips = 0
- @verbose = false
- end
- def run args = []
- @verbose = args.delete('-v')
- filter = if args.first =~ /^(-n|--name)$/ then
- args.shift
- arg = args.shift
- arg =~ /\/(.*)\// ? Regexp.new($1) : arg
- else
- /./ # anything - ^test_ already filtered by #tests
- end
- @@out.puts "Loaded suite #{$0.sub(/\.rb$/, '')}\nStarted"
- start = Time.now
- run_test_suites filter
- @@out.puts
- @@out.puts "Finished in #{'%.6f' % (Time.now - start)} seconds."
- @report.each_with_index do |msg, i|
- @@out.puts "\n%3d) %s" % [i + 1, msg]
- end
- @@out.puts
- format = "%d tests, %d assertions, %d failures, %d errors, %d skips"
- @@out.puts format % [test_count, assertion_count, failures, errors, skips]
- return failures + errors if @test_count > 0 # or return nil...
- end
- def run_test_suites filter = /./
- @test_count, @assertion_count = 0, 0
- old_sync, @@out.sync = @@out.sync, true if @@out.respond_to? :sync=
- TestCase.test_suites.each do |suite|
- suite.test_methods.grep(filter).each do |test|
- inst = suite.new test
- inst._assertions = 0
- @@out.print "#{suite}##{test}: " if @verbose
- t = Time.now if @verbose
- result = inst.run(self)
- @@out.print "%.2f s: " % (Time.now - t) if @verbose
- @@out.print result
- @@out.puts if @verbose
- @test_count += 1
- @assertion_count += inst._assertions
- end
- end
- @@out.sync = old_sync if @@out.respond_to? :sync=
- [@test_count, @assertion_count]
- end
- class TestCase
- attr_reader :name
- def run runner
- result = '.'
- begin
- @passed = nil
- self.setup
- self.__send__ self.name
- @passed = true
- rescue Exception => e
- @passed = false
- result = runner.puke(self.class, self.name, e)
- ensure
- begin
- self.teardown
- rescue Exception => e
- result = runner.puke(self.class, self.name, e)
- end
- end
- result
- end
- def initialize name
- @name = name
- @passed = nil
- end
- def self.reset
- @@test_suites = {}
- end
- reset
- def self.inherited klass
- @@test_suites[klass] = true
- end
- def self.test_order
- :random
- end
- def self.test_suites
- @@test_suites.keys.sort_by { |ts| ts.name }
- end
- def self.test_methods
- methods = public_instance_methods(true).grep(/^test/).map { |m|
- m.to_s
- }.sort
- if self.test_order == :random then
- max = methods.size
- methods = methods.sort_by { rand(max) }
- end
- methods
- end
- def setup; end
- def teardown; end
- def passed?
- @passed
- end
- include MiniTest::Assertions
- end # class TestCase
- end # class Test
-end # module Mini
View
18 dev/doc/Strategies.markdown
@@ -0,0 +1,18 @@
+STRATEGIES FOR BARETEST
+=======================
+
+
+
+Descriptions for Suites and Assertions
+--------------------------------------
+
+* suite "Modulename"
+ * suite "NestedClassname"
+
+
+
+Avoid interference
+------------------
+
+You can clone modules and classes for single tests to modify them for a
+specific test.
View
34 dev/features/dependencies/example.rb
@@ -1,34 +0,0 @@
-require 'parser'
-
-BareTest.suite 'Syntax' do
- suite 'primitives' do
- suite "nil" do
- setup do
- syntax = Parser::Syntax.new %w[syntax/primitives]
- @parser = Parser.new(syntax)
- end
-
- assert "Parses" :id => :parses do
- @parser.parse("nil") do nil_token end
- end
-
- requiring :parses do
- setup do
- @parser.parse("nil") do nil_token end
- end
-
- assert "Is clean" do
- @parser.clean?
- end
-
- assert "Is at end_of_buffer" do
- @parser.end_of_buffer?
- end
-
- assert "Is a NilToken" do
- equal :nil_token, @parser.root.children.first.class.node_id
- end
- end
- end
- end
-end
View
107 doc/announcements/baretest-0.3.0.txt
@@ -0,0 +1,107 @@
+SUBJECT: [ANN] BareTest 0.3 released
+
+I'm pleased to announce BareTest 0.3.
+
+BareTest is a test framework.
+<Insert what makes baretest great and why you'd use it, SHORT>
+
+Installation:
+
+ gem install baretest
+
+Test drive:
+ 1. git clone git://github.com/apeiros/baretest/.git (or download from
+ http://github.com/apeiros/baretest)
+ 2. cd into/the/repository
+ 3. ./bin/baretest
+
+You can
+* build the docs locally using `rake doc`
+* install the checked out version as a gem using `rake gem:install`
+* install the checked out version as a lib using `rake lib:install`
+
+Learning how to use the executable: guides.apeiros.me/baretest/executable
+Learning how to write baretest suites: guides.apeiros.me/baretest/tests
+
+Example Testsuite:
+
+
+Features:
+By this version, baretest has gotten some - to my knowledge - unique or at least
+rare features. Those include:
+
+* Very straightforward and terse assertions (just a block whose return value
+ defines success/failure).
+* Various helpers to write assertions with better diagnostic messages and
+ more complex tasks like raising, throwing, float imprecision, unordered
+ collections etc.
+* Easy grouping of assertions into suites.
+* BDD style specifications/test descriptions (NOT code) that can be extracted
+ without running the testcode.
+* An interactive mode, letting you examine what went wrong in a failing/erroring
+ test within an irb session, bound to the context of the assertion that failed,
+ showing you the full code of the assertion, even including it in the readline-
+ history of that irb session.
+* An uncomplicated way to write pending assertions, have dependency testing and
+ skip certain suites/assertions.
+* A colored shell formatter, diagnostic-, XML- and TAP formatter.
+* Adding your own formatters is trivial - a module with 4 methods to wrap. The
+ average formatter shipped with baretest is between 20 and 50 lines.
+* An API to use it from code, such as rake tasks (includes an example rake-task)
+* A 'baretest' executable to run tests on multiple files at once, using a test-
+ layout convention to reduce require- and setup-path-manipulation-orgies
+
+
+
+Links:
+Home: http://projects.sr.brightlight.ch/projects/show/baretest
+Github: http://github.com/apeiros/baretest
+Rubyforge: http://baretest.rubyforge.org
+API: http://baretest.rubyforge.org/docs-0.2.0/
+
+
+
+
+How to quickly try baretest without installing it:
+
+1. Download from github and unpack (or clone) - download link:
+ http://github.com/apeiros/baretest/tarball/8954b17def1899a10b0e6fff39ced07f6eb722ef
+2. Change into the baretest directory: `cd the/baretest/directory`
+3. Run the examples: `./bin/baretest examples/test.rb`
+
+That's it. Alternatively you can run baretest's own tests, and/or play with
+formatters: `./bin/baretest -f tap`
+
+
+
+Installing baretest
+
+1. run `gem install baretest` (you may have to run `sudo gem install baretest`)
+2. There is no 2.
+
+
+
+Installing baretest edge
+
+1. Download from github (or clone)
+2. Run `rake gem:install` (you may have to run `sudo rake gem:install`)
+
+Note for users with multiple ruby installations: the rake task will try to use
+the right gem executable. You can force it to use a specific one by setting
+the GEM env variable, e.g.: `rake gem:install GEM='gem1.9'`
+
+
+
+Using baretest
+
+1. In your project directory, run `baretest --init`, which will create a 'tests'
+ directory with all the basic stuff already in it.
+2. Write your tests
+3. Run them using `baretest` in the toplevel directory of your project.
+
+
+That's all folks.
+Looking forward to your feedback and hope you enjoy baretest :)
+
+Regards
+Stefan Rusterholz, aka apeiros
View
8 doc/announcements/structure.txt
@@ -0,0 +1,8 @@
+NAME
+SUMMARY (what is it? what does it to? in 3 sentences)
+NEWS (what changed in this version?)
+MOTIVATION (why did I write it? why not use the others?)
+DESCRIPTION (features)
+INSTALLATION (gem, test drive)
+USAGE
+LINKS
View
2  doc/baretest.rdoc
@@ -6,7 +6,7 @@
Basic Usage:
- baretest [options] [glob, ...]"
+ baretest [options] [glob, ...]
Either you provide a `glob` (or a directory, which is equivalent to DIRECTORY/\*\*/\*.rb),
then baretest will load all the files it matches and invoke BareTest.run in the end. Or you
View
34 doc/mocking_stubbing_test_doubles.rdoc
@@ -1,5 +1,33 @@
= Mocking, Stubbing and TestDoubles
-BareTest off-the-shelf provides currently only integration with mocha.
-You can use mocha (assuming you have installed the mocha gem) by requiring 'baretest/mocha'.
-Best you add that to your setup.rb.
+BareTest off-the-shelf provides currently only integration with mocha and rr.
+They are available as components.
+Until baretest 0.5 is released (which will resolve the issue), you should not
+use multiple different stubbing/mocking libraries within your tests, as they
+might collide (define methods with the same name e.g.).
+
+== Mocha
+
+Example suite using mocha:
+ suite "Some suite using mocha", :use => :mocha do
+ setup do
+ ...FIXME...
+ end
+
+ assert FIXME do
+ ...FIXME...
+ end
+ end
+
+== RR
+
+Example suite using rr:
+ suite "Some suite using rr", :use => :rr do
+ setup do
+ ...FIXME...
+ end
+
+ assert FIXME do
+ ...FIXME...
+ end
+ end
View
7 doc/news/news-0.3.0.rdoc
@@ -0,0 +1,7 @@
+NEWS
+
+For baretest version 0.3.0
+* Setup-variations
+* skip-method and Skip < StandardError
+* Persist data (independently of the test directory) over multiple runs
+* Formatter specific options
View
102 doc/quickref.rdoc
@@ -14,8 +14,10 @@ Also look into the examples and baretests own test directory.
1. git clone git://github.com/apeiros/baretest.git
2. cd baretest
3. rake gem:install
+ If 3. fails, try deleting the MANIFEST.txt and do `rake manifest:create`.
+ Then try step 3 again. Also you must have nokogiri and rdoc >=2.3 installed.
2. Change into the project directory
-3. `baretest --init` to create the basic test-directory layout
+3. `baretest init` to create the basic test-directory layout
@@ -25,11 +27,17 @@ Your tests for PROJECT/lib/foo.rb belong into PROJECT/test/suite/lib/foo.rb.
Your tests for PROJECT/bin/bar belong into PROJECT/test/suite/bin/bar.
In other words, for every path, insert /test/suite after PROJECT to get the
path to the corresponding testfile.
+Besides 'suite', baretest also recognizes 'integration', 'unit', and 'system'
+as directories. You can use these to separate different concerns of your suite.
== Writing tests
+One way to to learn baretest is to simply look at the examples in
+'examples/tests'. They should provide you with enough information for a quick
+start into writing tests using baretest.
+
A testfile commonly looks like this:
BareTest.suite "module ModuleName" do
@@ -73,7 +81,7 @@ A testfile commonly looks like this:
end
This layout makes it easy to figure where tests for something are, and thus
-makes maintaining the test-code base easier.
+makes maintaining the testcodebase easier.
Setup callbacks are invoked from outermost suite to innermost suite, and
within the same suite, in the order of definition.
@@ -118,9 +126,40 @@ Running this suite will print:
-== Skipping Tests and Suites
+== Skipping and ignoring Suites and Assertions
+
+A suite is pending if it either has no block or a block which contains no
+assertions and suites.
+
+You can skip a suite by:
+* Creating the suite with a :skip option, like
+ `suite "MySuite", :skip => "I want to skip this suite" do`
+* Calling skip in the suite, like
+ suite "MySuite" do
+ skip "I want to skip this suite"
+ end
+ You can call skip at any point in the suite.
+
+You can ignore a suite by:
+* Adding one or more tags to the suite, like
+ `suite "MySuite", :tags => [:set_x, :set_y]`
+ And then specify any of those tags to be ignored, like:
+ `baretest -- -:set_x`
+
+An assertion is pending if it has no block.
+
+You can skip an assertion by:
+* Having it in a suite that is skipped
+* Creating the assertion with a :skip option, like
+ `assert "Something", :skip => "I want to skip this assertion" do`
+* Calling skip in the assertion, like
+ assert "Something" do
+ skip "I want to skip this assertion"
+ end
+ You can call skip at any point in the assertion.
-A test is skipped if it does not have a block or calls 'skip'
+You can ignore an assertion by:
+* Having it in a suite that is ignored
== Assertion helper methods
@@ -226,13 +265,15 @@ can alternatively be used with named arguments:
baretest's test-cycle is:
-1. Create Run instance and the toplevel suite
-2. Load everything as required by the command line flags
-3. Load PROJECT/test/setup.rb
-4. Find PROJECT/test/suite/**/*.rb
-5. Load each file found in 2., but for every file, see whether
- PROJECT/test/helpers/suite/**/*.rb exists and load that first if it does
-6. Invoke run on the Run instance
+1. Create the toplevel suite
+2. Load PROJECT/test/setup.rb
+3. Find every file as required by the command line flags (defaults to
+ PROJECT/test/{suite,unit,integration,system}/**/*.rb)
+4. Load each file found in 3., but for every file, see whether
+ PROJECT/test/helpers/**/*.rb exists and load that first if it does
+ (e.g. for PROJECT/test/suite/foo.rb load PROJECT/test/helpers/suite/foo.rb)
+5. Create a BareTest::Run instance with the toplevel suite and the passed options
+6. Invoke run_all on that Run instance.
From there on it depends on the loaded formatters and extenders, what really
will happen. But the norm is, that suites and assertions will be executed in
@@ -242,20 +283,25 @@ order of definition.
== Debugging tests
-Use `baretest -i` to run baretest in interactive mode. When a failure or an
-error occurs, you have access to the following commands:
-
-* s! - original assertions' status
-* e! - error message and full backtrace
-* em! - error message
-* bt! - full backtrace
-* iv! - all available instance variables
-* cv! - all available class variables
-* gv! - all available global variables
-* file - file this assertion was defined in
-* line - line number in the file where this assertion's definition starts
-* nesting - a '>'-separated list of suite descriptions this assertion is
- nested in
-* description - this assertion's description
-* code - code of this assertion
-* help - overview over all the commands
+Use `baretest -i` to run baretest in interactive mode. Try it with
+`baretest -i examples/irb_mode/failures.rb`
+When a failure or an error occurs, you have access to the following commands:
+
+help!:: overview over all the commands
+s!:: the assertions' original status
+sc!:: the assertions' original status code
+e!:: prints the error message and full backtrace
+em!:: prints the error message
+bt!:: prints the full backtrace
+lv!:: lists all available local variables
+iv!:: lists all available instance variables
+cv!:: lists all available class variables
+gv!:: lists all available global variables, per default dropping rubys
+ standard globals (use gv!(false) to avoid that)
+file!:: the file this assertion was defined in
+line!:: the line number in the file where this assertion's definition
+ starts
+nesting!:: a '>'-separated list of suite descriptions this assertion is
+ nested in
+description!:: this assertion's description
+code!:: code of this assertion
View
5 doc/whats_going_on.rdoc
@@ -1,3 +1,8 @@
+= What's going on
+
+This document intends to show you what happens behind the scene and help you
+understand the mechanics of baretest.
+
With the following test definition:
BareTest.suite "A"
setup do
View
38 doc/writing_tests.rdoc
@@ -25,7 +25,7 @@ The standard directory layout looks like this:
|-- rake (contains rake relevant stuff)
`-- Rakefile
-In your project directory, you can invoke `baretest --init`, this will
+In your project directory, you can invoke `baretest init`, this will
create the 'test' directory. It will mirror your project directory. That is,
it will recreate all directories nested in bin and lib within test/suite.
The directory layout of 'test' is as follows:
@@ -118,31 +118,43 @@ In this simplistic example, this may seem like wasted time. The more complex the
setup becomes and the more assertions need the same setup, the more time a
separate setup phase saves.
It additionally helps in making intent clear: this is setup, and this is test.
+The setup and teardown is run (via instance_eval) in the same context as the
+assertion. Local variables however are NOT shared. To pass data from the setup
+to the assertion, use instance variables as shown here.
+
== 5. When troubles strike
If one of your assertions fails or errors, you can use `baretest -i` to
-investigate the issue. It will throw you into an irb session, with
-self being the failing/erroring assertion and with several helpful
-methods (use `help` in the irb session to get a list of those).
+investigate the issue. It will throw you into an irb session, with self being
+the failing/erroring assertion context and with several helpful methods (use
+`help` in the irb session to get a list of those).
== Things left to be written out
+
+This is not part of the tutorial but things the author of this tutorial should
+still add to the tutorial itself.
+
* toplevel suite may have a name/description too, it'll act the same as if
there was a suite in an unnamed toplevel suite
* [setup] They will also be run for every nested suite's assertion,
where the outermost setup is run first, the innermost last.
* using stubs & mocks
-* However, suites with the same name are considered the same.
+* Suites with the same name and nesting are considered the same and become
+ merged
- For example, this code:
+ Example:
- BareTest.suite "class Foo" do
- suite "class Bar" do
- assert "foo"
+ BareTest.suite "Foo" do
+ suite "Bar" do
+ assert "x"
+ end
+ end
+ BareTest.suite "Foo" do
+ suite "Bar" do
+ assert "y"
+ end
end
-
- Just like ruby's
- namespacing works. That is, if you twice do `module X; class Y; ...; end; end`,
- it will both times open the same class X::Y.
+ Now the suite "Foo" > "Bar" has two assertions, "x" and "y"
View
871 docs/BareTest.html
@@ -0,0 +1,871 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+
+ <title>Module: BareTest</title>
+
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
+
+ <script src="./js/jquery.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="./js/quicksearch.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="./js/darkfish.js" type="text/javascript"
+ charset="utf-8"></script>
+
+</head>
+<body class="module">
+
+ <div id="metadata">
+ <div id="file-metadata">
+ <div id="file-list-section" class="section">
+ <h3 class="section-header">In Files</h3>
+ <div class="section-body">
+ <ul>
+
+ <li><a href="./lib/baretest/assertion/context_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/assertion/context.rb">lib/baretest/assertion/context.rb</a></li>
+
+ <li><a href="./lib/baretest/assertion/failure_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/assertion/failure.rb">lib/baretest/assertion/failure.rb</a></li>
+
+ <li><a href="./lib/baretest/assertion/skip_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/assertion/skip.rb">lib/baretest/assertion/skip.rb</a></li>
+
+ <li><a href="./lib/baretest/assertion/support_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/assertion/support.rb">lib/baretest/assertion/support.rb</a></li>
+
+ <li><a href="./lib/baretest/assertion_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/assertion.rb">lib/baretest/assertion.rb</a></li>
+
+ <li><a href="./lib/baretest/commandline_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/commandline.rb">lib/baretest/commandline.rb</a></li>
+
+ <li><a href="./lib/baretest/formatter_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/formatter.rb">lib/baretest/formatter.rb</a></li>
+
+ <li><a href="./lib/baretest/invalidselectors_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/invalidselectors.rb">lib/baretest/invalidselectors.rb</a></li>
+
+ <li><a href="./lib/baretest/irb_mode_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/irb_mode.rb">lib/baretest/irb_mode.rb</a></li>
+
+ <li><a href="./lib/baretest/layout_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/layout.rb">lib/baretest/layout.rb</a></li>
+
+ <li><a href="./lib/baretest/persistence_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/persistence.rb">lib/baretest/persistence.rb</a></li>
+
+ <li><a href="./lib/baretest/run/cli_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/cli.rb">lib/baretest/run/cli.rb</a></li>
+
+ <li><a href="./lib/baretest/run/minimal_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/minimal.rb">lib/baretest/run/minimal.rb</a></li>
+
+ <li><a href="./lib/baretest/run/none_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/none.rb">lib/baretest/run/none.rb</a></li>
+
+ <li><a href="./lib/baretest/run/profile_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/profile.rb">lib/baretest/run/profile.rb</a></li>
+
+ <li><a href="./lib/baretest/run/spec_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/spec.rb">lib/baretest/run/spec.rb</a></li>
+
+ <li><a href="./lib/baretest/run/tap_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/tap.rb">lib/baretest/run/tap.rb</a></li>
+
+ <li><a href="./lib/baretest/run/xml_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run/xml.rb">lib/baretest/run/xml.rb</a></li>
+
+ <li><a href="./lib/baretest/run_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/run.rb">lib/baretest/run.rb</a></li>
+
+ <li><a href="./lib/baretest/safe_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/safe.rb">lib/baretest/safe.rb</a></li>
+
+ <li><a href="./lib/baretest/setup_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/setup.rb">lib/baretest/setup.rb</a></li>
+
+ <li><a href="./lib/baretest/status_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/status.rb">lib/baretest/status.rb</a></li>
+
+ <li><a href="./lib/baretest/suite_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/suite.rb">lib/baretest/suite.rb</a></li>
+
+ <li><a href="./lib/baretest/uid_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/uid.rb">lib/baretest/uid.rb</a></li>
+
+ <li><a href="./lib/baretest/version_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest/version.rb">lib/baretest/version.rb</a></li>
+
+ <li><a href="./lib/baretest_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+ class="thickbox" title="lib/baretest.rb">lib/baretest.rb</a></li>
+
+ </ul>
+ </div>
+ </div>
+
+
+ </div>
+
+ <div id="class-metadata">
+
+ <!-- Parent Class -->
+
+
+ <!-- Namespace Contents -->
+
+ <div id="namespace-list-section" class="section">
+ <h3 class="section-header">Namespace</h3>
+ <ul class="link-list">
+
+ <li><span class="type">MODULE</span> <a href="BareTest/CommandLine.html">BareTest::CommandLine</a></li>
+
+ <li><span class="type">MODULE</span> <a href="BareTest/Formatter.html">BareTest::Formatter</a></li>
+
+ <li><span class="type">MODULE</span> <a href="BareTest/IRBMode.html">BareTest::IRBMode</a></li>
+
+ <li><span class="type">MODULE</span> <a href="BareTest/VERSION.html">BareTest::VERSION</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/Assertion.html">BareTest::Assertion</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/InvalidSelectors.html">BareTest::InvalidSelectors</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/Persistence.html">BareTest::Persistence</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/Run.html">BareTest::Run</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/Status.html">BareTest::Status</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/Suite.html">BareTest::Suite</a></li>
+
+ <li><span class="type">CLASS</span> <a href="BareTest/UID.html">BareTest::UID</a></li>
+
+ </ul>
+ </div>
+
+
+ <!-- Method Quickref -->
+
+ <div id="method-list-section" class="section">
+ <h3 class="section-header">Methods</h3>
+ <ul class="link-list">
+
+ <li><a href="#M000129">::component</a></li>
+
+ <li><a href="#M000119">::load_standard_test_files</a></li>
+
+ <li><a href="#M000120">::most_important_status</a></li>
+
+ <li><a href="#M000131">::new_component</a></li>
+
+ <li><a href="#M000126">::process_selectors</a></li>
+
+ <li><a href="#M000117">::require_baretest</a></li>
+
+ <li><a href="#M000118">::require_ruby</a></li>
+
+ <li><a href="#M000130">::suite</a></li>
+
+ <li><a href="#M000132">::use</a></li>
+
+ </ul>
+ </div>
+
+
+ <!-- Included Modules -->
+