concordion 0.9.9.2 → 0.9.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/README +0 -0
  2. data/Rakefile.rb +25 -28
  3. data/documentation/index.html +88 -0
  4. data/documentation/p/rcor/wiki/Tutorial/index.html +75 -0
  5. data/lib/concordion/binder.rb +26 -0
  6. data/lib/concordion/constants.rb +15 -0
  7. data/lib/{concordion_css.rb → concordion/css.rb} +9 -7
  8. data/lib/concordion/css_decorator.rb +59 -0
  9. data/lib/concordion/environment.rb +28 -0
  10. data/lib/concordion/error_condition.rb +27 -0
  11. data/lib/concordion/instrumenter.rb +31 -0
  12. data/lib/concordion/invoker.rb +148 -0
  13. data/lib/concordion/loader_helper.rb +17 -0
  14. data/lib/concordion/lookahead_handler.rb +16 -0
  15. data/lib/concordion/parse_result.rb +74 -0
  16. data/lib/concordion/parser.rb +43 -0
  17. data/lib/concordion/processor.rb +24 -0
  18. data/lib/concordion/reader.rb +11 -0
  19. data/lib/concordion/state.rb +77 -0
  20. data/lib/concordion/string_utility.rb +104 -0
  21. data/lib/concordion/string_writer.rb +13 -0
  22. data/lib/concordion/test_methods.rb +130 -0
  23. data/lib/concordion/utility.rb +72 -0
  24. data/lib/concordion/verifier.rb +52 -0
  25. data/lib/concordion/writer.rb +52 -0
  26. data/lib/concordion_test_case.rb +4 -16
  27. data/lib/goldmaster_test_case.rb +4 -4
  28. data/ruby-concordion.tmproj +249 -0
  29. data/test/concordion/css_decorator_test.rb +28 -0
  30. data/test/concordion/environment_test.rb +46 -0
  31. data/test/concordion/invoker_test.rb +20 -0
  32. data/test/concordion/parse_result_test.rb +51 -0
  33. data/test/concordion/reader_test.rb +12 -0
  34. data/test/concordion/state_test.rb +41 -0
  35. data/test/concordion/string_writer_test.rb +10 -0
  36. data/test/concordion/utility_test.rb +142 -0
  37. data/test/concordion/verifier_test.rb +38 -0
  38. data/test/concordion/writer_test.rb +29 -0
  39. data/{tests → test}/concordion.css +0 -0
  40. data/{tests/concordion → test}/goldmaster_test_case_test.rb +2 -8
  41. data/{tests → test/spec}/basic_assert.html +0 -0
  42. data/{tests → test/spec}/basic_assert_test.rb +2 -2
  43. data/{tests → test/spec}/basic_set.html +0 -0
  44. data/{tests → test/spec}/basic_set_test.rb +0 -1
  45. data/{tests → test/spec}/basic_text.html +0 -0
  46. data/{tests → test/spec}/basic_text_test.rb +0 -1
  47. data/{tests → test/spec}/failing.html +0 -0
  48. data/{tests → test/spec}/failing_test.rb +0 -1
  49. data/{tests → test/spec}/goldmasters/failing_with_subclass.html +0 -0
  50. data/{tests → test/spec}/goldmasters/failing_with_subclass_goldmaster.html +0 -0
  51. data/{tests → test/spec}/goldmasters/failing_with_subclass_test.rb +2 -2
  52. data/{tests → test/spec}/goldmasters/goldmaster_assert_true_failing.html +0 -0
  53. data/{tests → test/spec}/goldmasters/goldmaster_assert_true_failing_goldmaster.html +0 -0
  54. data/{tests → test/spec}/goldmasters/goldmaster_assert_true_failing_test.rb +0 -0
  55. data/{tests → test/spec}/goldmasters/goldmaster_failing.html +0 -0
  56. data/{tests → test/spec}/goldmasters/goldmaster_failing_goldmaster.html +0 -0
  57. data/{tests → test/spec}/goldmasters/goldmaster_failing_test.rb +0 -2
  58. data/{tests → test/spec}/goldmasters/goldmaster_malformed.html +0 -0
  59. data/{tests → test/spec}/goldmasters/goldmaster_malformed_goldmaster.html +0 -0
  60. data/{tests → test/spec}/goldmasters/goldmaster_malformed_test.rb +0 -0
  61. data/{tests → test/spec}/goldmasters/goldmaster_passing.html +0 -0
  62. data/{tests → test/spec}/goldmasters/goldmaster_passing_goldmaster.html +0 -0
  63. data/{tests → test/spec}/goldmasters/goldmaster_passing_test.rb +0 -0
  64. data/{tests → test/spec}/goldmasters/goldmaster_table.html +0 -0
  65. data/{tests → test/spec}/goldmasters/goldmaster_table_bug.html +0 -0
  66. data/{tests → test/spec}/goldmasters/goldmaster_table_bug_goldmaster.html +0 -0
  67. data/{tests → test/spec}/goldmasters/goldmaster_table_bug_test.rb +0 -0
  68. data/{tests → test/spec}/goldmasters/goldmaster_table_goldmaster.html +0 -0
  69. data/{tests → test/spec}/goldmasters/goldmaster_table_test.rb +1 -0
  70. data/{tests → test/spec}/image.html +0 -0
  71. data/{tests → test/spec}/image.jpg +0 -0
  72. data/{tests → test/spec}/image_test.rb +2 -2
  73. data/{tests → test/spec}/link_style_css.html +0 -0
  74. data/{tests → test/spec}/link_style_css_test.rb +1 -6
  75. data/{tests → test/spec}/lookahead_assert_true.html +0 -0
  76. data/{tests → test/spec}/lookahead_assert_true_test.rb +0 -0
  77. data/{tests → test/spec}/mixed.html +0 -0
  78. data/test/spec/mixed_test.rb +13 -0
  79. data/{tests → test/spec}/nested_element_lookahead.html +0 -0
  80. data/{tests → test/spec}/nested_element_lookahead_test.rb +0 -0
  81. data/{tests → test/spec}/numbers.html +0 -0
  82. data/{tests → test/spec}/numbers_test.rb +0 -0
  83. data/{tests → test/spec}/processes_elements_in_sorted_order.html +0 -0
  84. data/{tests → test/spec}/processes_elements_in_sorted_order_test.rb +0 -0
  85. data/{tests → test/spec}/return_result.html +0 -0
  86. data/{tests → test/spec}/return_result_test.rb +0 -0
  87. data/test/spec/structure/maps_to_module.html +11 -0
  88. data/test/spec/structure/maps_to_module_test.rb +13 -0
  89. data/{tests → test/spec}/tables/single_row_table.html +0 -0
  90. data/{tests → test/spec}/tables/single_row_table_test.rb +0 -0
  91. data/{tests → test/spec}/tables/table.html +0 -0
  92. data/{tests → test/spec}/tables/table_test.rb +1 -0
  93. data/{tests → test/spec}/tables/test_helper.rb +3 -7
  94. data/{tests → test/spec}/tables/verify_rows.html +0 -0
  95. data/{tests → test/spec}/tables/verify_rows_scsr.html +0 -0
  96. data/{tests → test/spec}/tables/verify_rows_scsr_test.rb +2 -1
  97. data/{tests → test/spec}/tables/verify_rows_simple.html +0 -0
  98. data/{tests → test/spec}/tables/verify_rows_simple_test.rb +0 -0
  99. data/{tests → test/spec}/tables/verify_rows_test.rb +1 -0
  100. data/{tests → test/spec}/user-reported/apostrophe.html +0 -0
  101. data/{tests → test/spec}/user-reported/apostrophe_test.rb +0 -1
  102. data/{tests → test/spec}/user-reported/ariel_example.html +0 -0
  103. data/{tests → test/spec}/user-reported/ariel_example_test.rb +0 -0
  104. data/{tests → test/spec}/user-reported/attr_assert.html +0 -0
  105. data/{tests → test/spec}/user-reported/attr_assert_test.rb +0 -1
  106. data/{tests → test/spec}/user-reported/basic_assert_true.html +0 -0
  107. data/{tests → test/spec}/user-reported/basic_assert_true_test.rb +1 -2
  108. data/{tests → test/spec}/user-reported/rubyish.html +0 -0
  109. data/{tests → test/spec}/user-reported/rubyish_test.rb +0 -1
  110. data/test/test_helper.rb +11 -0
  111. metadata +131 -114
  112. data/lib/concordion_binder.rb +0 -24
  113. data/lib/concordion_constants.rb +0 -13
  114. data/lib/concordion_css_decorator.rb +0 -58
  115. data/lib/concordion_environment.rb +0 -27
  116. data/lib/concordion_error_condition.rb +0 -26
  117. data/lib/concordion_instrumenter.rb +0 -30
  118. data/lib/concordion_invoker.rb +0 -137
  119. data/lib/concordion_lookahead_handler.rb +0 -17
  120. data/lib/concordion_parse_result.rb +0 -72
  121. data/lib/concordion_parser.rb +0 -47
  122. data/lib/concordion_processor.rb +0 -25
  123. data/lib/concordion_reader.rb +0 -10
  124. data/lib/concordion_state.rb +0 -78
  125. data/lib/concordion_string_utility.rb +0 -97
  126. data/lib/concordion_string_writer.rb +0 -13
  127. data/lib/concordion_test_methods.rb +0 -132
  128. data/lib/concordion_utility.rb +0 -70
  129. data/lib/concordion_verifier.rb +0 -50
  130. data/lib/concordion_writer.rb +0 -43
  131. data/lib/loader_helper.rb +0 -16
  132. data/tests/concordion/concordion_css_decorator_test.rb +0 -28
  133. data/tests/concordion/concordion_environment_test.rb +0 -44
  134. data/tests/concordion/concordion_parse_result_test.rb +0 -51
  135. data/tests/concordion/concordion_reader_test.rb +0 -15
  136. data/tests/concordion/concordion_state_test.rb +0 -38
  137. data/tests/concordion/concordion_string_writer_test.rb +0 -13
  138. data/tests/concordion/concordion_utility_test.rb +0 -135
  139. data/tests/concordion/concordion_verifier_test.rb +0 -38
  140. data/tests/concordion/concordion_writer_test.rb +0 -26
  141. data/tests/mixed_test.rb +0 -19
@@ -0,0 +1,29 @@
1
+ require File.join(File.dirname(__FILE__),'..','test_helper')
2
+ require 'concordion/writer'
3
+
4
+ module Concordion
5
+ class WriterTest < Test::Unit::TestCase
6
+ def test_output_file_name
7
+
8
+ assert_equal "./bleh_test_output.html",
9
+ Concordion::Writer.new.output_filename_for("bleh.html")
10
+ assert_equal "./bleh_test_output.html",
11
+ Concordion::Writer.new(nil).output_filename_for("bleh.html")
12
+ assert_equal "foo/bleh_test_output.html",
13
+ Concordion::Writer.new("foo").output_filename_for("bleh.html")
14
+ end
15
+
16
+ def test_retains_directory_structure_of_the_file
17
+ assert_equal "./foo/bleh_test_output.html",
18
+ Concordion::Writer.new.output_filename_for("foo/bleh.html")
19
+ end
20
+
21
+ def test_output_file_exists
22
+ File.expects(:exists?).with("foo/output.css").returns(true)
23
+ File.expects(:exists?).with("foo/missing").returns(false)
24
+
25
+ assert Concordion::Writer.new("foo").output_file_exists?("output.css")
26
+ assert !Concordion::Writer.new("foo").output_file_exists?("missing")
27
+ end
28
+ end
29
+ end
File without changes
@@ -1,11 +1,5 @@
1
- # To change this template, choose Tools | Templates
2
- # and open the template in the editor.
3
-
4
- $:.unshift File.join(File.dirname(__FILE__),'..','lib')
5
-
6
- require 'test/unit'
7
- require 'goldmaster_test_case'
8
- require 'mocha'
1
+ require File.join(File.dirname(__FILE__),'test_helper')
2
+ require "goldmaster_test_case"
9
3
 
10
4
  class GoldmasterTestCaseTest < Test::Unit::TestCase
11
5
  include FailConditionally
File without changes
@@ -1,9 +1,9 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class BasicAssertTest < ConcordionTestCase
5
-
4
+
6
5
  def getGreeting
7
6
  "Hello World!"
8
7
  end
9
8
  end
9
+
File without changes
@@ -1,4 +1,3 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class BasicSetTest < ConcordionTestCase
File without changes
@@ -1,4 +1,3 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class BasicTextTest < ConcordionTestCase
File without changes
@@ -1,4 +1,3 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class FailingTest < ConcordionTestCase
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require 'concordion_test_methods'
2
+ require 'concordion/test_methods'
3
3
 
4
4
 
5
5
  class ArbitraryBaseTestCase < Test::Unit::TestCase
@@ -9,7 +9,7 @@ class ArbitraryBaseTestCase < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  class FailingWithSubclassTest < ArbitraryBaseTestCase
12
- include ConcordionTestMethods
12
+ include Concordion::TestMethods
13
13
 
14
14
  def expected_failure_count
15
15
  2
@@ -1,8 +1,6 @@
1
1
  require 'test_helper'
2
2
  require 'goldmaster_test_case'
3
3
 
4
- require 'mocha'
5
-
6
4
  class GoldmasterFailingTest < GoldmasterTestCase
7
5
  def expected_failure_count
8
6
  9
@@ -1,3 +1,4 @@
1
+ require 'test_helper'
1
2
  require 'goldmaster_test_case'
2
3
  require 'user'
3
4
 
File without changes
File without changes
@@ -1,8 +1,8 @@
1
1
  require 'test_helper'
2
2
  require 'concordion_test_case'
3
- require 'loader_helper'
3
+
4
4
  class ImageTest < ConcordionTestCase
5
- include LoaderHelper
5
+ include Concordion::LoaderHelper
6
6
  def image_data
7
7
  File.read(path_for("image.jpg"))
8
8
  end
File without changes
@@ -1,11 +1,6 @@
1
- # To change this template, choose Tools | Templates
2
- # and open the template in the editor.
3
-
4
- $:.unshift File.join(File.dirname(__FILE__),'..','lib')
5
-
1
+ require 'test_helper'
6
2
  require 'concordion_test_case'
7
3
 
8
-
9
4
  class LinkStyleCssTest < ConcordionTestCase
10
5
  def expected_failure_count
11
6
  1
File without changes
File without changes
File without changes
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+ require 'concordion/test_methods'
3
+
4
+ class MixedTest < Test::Unit::TestCase
5
+ include Concordion::TestMethods
6
+
7
+ def easy
8
+ "as pie"
9
+ end
10
+ def test_foo
11
+ assert_equal "foo", "foo"
12
+ end
13
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
+ <body>
3
+ <span>
4
+ <h1>Module Specification</h1>
5
+ <h4>Demonstrates how Modules are used to organize specifications.</h4>
6
+ <blockquote>
7
+ <quote concordion:assertTrue="modules_work?">testing modules</quote>
8
+ </blockquote>
9
+ </span>
10
+ </body>
11
+ </html>
@@ -0,0 +1,13 @@
1
+ require File.join(File.dirname(__FILE__),'..','..','test_helper')
2
+ require 'concordion/test_methods'
3
+
4
+ module Structure
5
+ class MapsToModuleTest < Test::Unit::TestCase
6
+ include Concordion::TestMethods
7
+
8
+ def modules_work?
9
+ true
10
+ end
11
+
12
+ end
13
+ end
File without changes
File without changes
@@ -1,5 +1,6 @@
1
1
  require 'test_helper'
2
2
  require 'concordion_test_case'
3
+ require 'single_row_result'
3
4
 
4
5
  class TableTest < ConcordionTestCase
5
6
  def split_by_colons(text)
@@ -1,9 +1,5 @@
1
- $: << File.join(File.expand_path(File.dirname( __FILE__)),"..","lib")
2
- $: << File.join(File.expand_path(File.dirname( __FILE__)),"..","test-lib")
1
+ $: << File.join(File.expand_path(File.dirname( __FILE__)),"..","..","..","lib")
2
+ $: << File.join(File.expand_path(File.dirname( __FILE__)),"..","..","..","test-lib")
3
3
  $: << File.expand_path(File.dirname( __FILE__))
4
4
 
5
- require "test/unit"
6
-
7
- class Test::Unit::TestCase
8
-
9
- end
5
+ require "test/unit"
File without changes
File without changes
@@ -1,6 +1,7 @@
1
-
1
+ require 'test_helper'
2
2
  require 'concordion_test_case'
3
3
  require 'user'
4
+
4
5
  class VerifyRowsScsrTest < ConcordionTestCase
5
6
  def setup
6
7
  @users = []
File without changes
@@ -1,5 +1,6 @@
1
1
  require 'test_helper'
2
2
  require 'concordion_test_case'
3
+ require 'user'
3
4
 
4
5
  class VerifyRowsTest < ConcordionTestCase
5
6
  def setup
File without changes
@@ -1,4 +1,3 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class ApostropheTest < ConcordionTestCase
File without changes
@@ -1,4 +1,3 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class AttrAssertTest < ConcordionTestCase
@@ -1,6 +1,5 @@
1
- # To change this template, choose Tools | Templates
2
- # and open the template in the editor.
3
1
  require 'concordion_test_case'
2
+
4
3
  class BasicAssertTrueTest < ConcordionTestCase
5
4
  def expected_failure_count
6
5
  1
File without changes
@@ -1,4 +1,3 @@
1
- require 'test_helper'
2
1
  require 'concordion_test_case'
3
2
 
4
3
  class RubyishTest < ConcordionTestCase
@@ -0,0 +1,11 @@
1
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
2
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib','concordion')
3
+ $:.unshift File.join(File.dirname(__FILE__),'..','test-lib')
4
+ $:.unshift File.join(File.dirname(__FILE__),'spec')
5
+ $:.unshift File.join(File.dirname(__FILE__),'spec','structure')
6
+ $:.unshift File.join(File.dirname(__FILE__),'spec','user-reported')
7
+ ENV['RCOR_OUTPUT_DIR'] ||= File.join(File.expand_path(File.dirname( __FILE__)),'..','documentation','spec-output')
8
+
9
+ require 'rubygems'
10
+ require 'test/unit'
11
+ require 'mocha'