graffle 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/History.txt +5 -4
  2. data/Manifest.txt +13 -10
  3. data/Rakefile.hoe +1 -1
  4. data/examples/rails-workflow-test.expected +10 -0
  5. data/examples/rails-workflow-test.graffle/data.plist +1033 -0
  6. data/examples/rails-workflow-test.graffle/image1.png +0 -0
  7. data/examples/rails-workflow-test.graffle/image2.png +0 -0
  8. data/examples/rails-workflow-test.graffle/image3.png +0 -0
  9. data/examples/rails-workflow-test.rb +40 -0
  10. data/graffle.tmproj +431 -2
  11. data/lib/graffle/stereotypes.rb +15 -4
  12. data/lib/graffle/styled-text-reader.rb +3 -0
  13. data/lib/graffle/version.rb +1 -1
  14. data/lib/graphical_tests_for_rails.rb +25 -0
  15. data/lib/graphical_tests_for_rails/interpreters.rb +147 -0
  16. data/lib/graphical_tests_for_rails/orderings.rb +101 -0
  17. data/test/graffle-file-types/opening-tests.rb +0 -1
  18. data/test/graphical_tests_for_rails/graphic-interpreter-tests.rb +131 -0
  19. data/test/graphical_tests_for_rails/in-workflow-order-tests.rb +165 -0
  20. data/test/{grails-tests/commands-from-quoted-args-tests.rb → graphical_tests_for_rails/text-interpreter-tests.rb} +38 -27
  21. data/test/line-graphic-tests.rb +8 -0
  22. data/test/sheet-tests.rb +18 -0
  23. data/test/tests-of-examples/workflow-slowtests.rb +19 -0
  24. metadata +20 -18
  25. data/bin/bin-skeleton +0 -13
  26. data/lib/graffle/lib-skeleton +0 -3
  27. data/lib/grail_test.rb +0 -16
  28. data/lib/grail_test/command-interpreters.rb +0 -78
  29. data/test/grails-tests/destinations-tests.rb +0 -19
  30. data/test/grails-tests/do-nothing-commands-tests.rb +0 -18
  31. data/test/grails-tests/graphic-interpreter-tests.rb +0 -70
  32. data/test/grails-tests/translation-testcase.rb +0 -25
  33. data/test/test-skeleton +0 -19
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Created by Brian Marick on 2007-07-06.
4
- # Copyright (c) 2007. All rights reserved.
5
-
6
- require "../set-standalone-test-paths.rb" unless $started_from_rakefile
7
- require 'test/grails-tests/translation-testcase'
8
-
9
- class TestDestinationCheckCreation < TranslationTestCase
10
-
11
- def setup
12
- @interpreter = Destinations.new
13
- end
14
-
15
- def test_translation
16
- assert_translation(['assert_on_page', "markup"],
17
- "MARKUP")
18
- end
19
- end
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Created by Brian Marick on 2007-07-06.
4
- # Copyright (c) 2007. All rights reserved.
5
-
6
- require "../set-standalone-test-paths.rb" unless $started_from_rakefile
7
- require 'test/grails-tests/translation-testcase'
8
-
9
- class TestCommandsThatDoNothing < TranslationTestCase
10
-
11
- def setup
12
- @interpreter = DoNothingCommands.new
13
- end
14
-
15
- def test_translation
16
- assert_translation([:object_id], "MARKUP")
17
- end
18
- end
@@ -1,70 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Created by Brian Marick on 2007-07-10.
4
- # Copyright (c) 2007. All rights reserved.
5
-
6
- require 'test/unit'
7
- require 's4t-utils'
8
- include S4tUtils
9
-
10
- require "../set-standalone-test-paths.rb" unless $started_from_rakefile
11
- require 'test/grails-tests/translation-testcase'
12
-
13
- require 'extensions/string'
14
- require 'grail_test'
15
-
16
-
17
- class GraphicInterpreterTest < Test::Unit::TestCase
18
- include Graffle::Builders
19
- include GrailTest
20
-
21
- class CommandRecorder
22
- attr_reader :record
23
- def initialize
24
- @record = []
25
- end
26
-
27
- def method_missing(message, *args)
28
- @record << "#{message}(" + args.collect { | a | a.inspect }.join(", ") + ')'
29
- end
30
- end
31
-
32
- def two_graphics
33
- s = sheet {
34
- with line_label {
35
- for_line 1
36
- with_text 'produce "argument"'
37
- }
38
- with line_graphic {
39
- graffle_id_is 1
40
- }
41
- with shaped_graphic {
42
- graffle_id_is 2
43
- with_text "SIGNUP"
44
- }
45
- }
46
-
47
- [s.find_by_id(1), s.find_by_id(2)]
48
- end
49
-
50
- def assert_commands_produced(expected, interpreter)
51
- recorder = CommandRecorder.new
52
- interpreter.run_against(recorder)
53
- assert_equal(expected, recorder.record)
54
- end
55
-
56
-
57
- def test_interpreter_applies_strategies
58
- interpreter = GraphicInterpreter.new(two_graphics,
59
- 'interpret line labels as' => CommandsWithQuotedArgs,
60
- 'interpret shaped graphic text as' => Destinations)
61
- assert_commands_produced(['produce("argument")', 'assert_on_page("signup")'],
62
- interpreter)
63
- end
64
-
65
-
66
- def test_interpreter_can_omit_strategies
67
- interpreter = GraphicInterpreter.new(two_graphics)
68
- assert_commands_produced([], interpreter)
69
- end
70
- end
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Created by Brian Marick on 2007-07-10.
4
- # Copyright (c) 2007. All rights reserved.
5
-
6
-
7
- require 'test/unit'
8
- require 's4t-utils'
9
- include S4tUtils
10
-
11
- require 'extensions/string'
12
- require 'grail_test'
13
-
14
-
15
- class TranslationTestCase < Test::Unit::TestCase
16
- include GrailTests
17
-
18
- def test_default; "quiet, test/unit!"; end
19
-
20
- def assert_translation(expected, original)
21
- actual = @interpreter.produce_method_call(original)
22
- assert_equal(expected, actual)
23
- end
24
-
25
- end
@@ -1,19 +0,0 @@
1
- require "set-standalone-test-paths.rb" unless $started_from_rakefile
2
- require 'test/unit'
3
- require 's4t-utils'
4
- include S4tUtils
5
-
6
- require 'graffle'
7
-
8
- class TestName < Test::Unit::TestCase
9
- include Graffle
10
-
11
- def setup
12
- end
13
-
14
- def teardown
15
- end
16
-
17
- def test_something
18
- end
19
- end