RubyApp 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -3
- data/Gemfile.lock +1 -1
- data/features/default.feature +2 -2
- data/features/elements/button.feature +9 -0
- data/features/{dialog.feature → elements/dialog.feature} +19 -13
- data/features/elements/input.feature +20 -0
- data/features/elements/link.feature +9 -0
- data/features/elements/list.feature +19 -0
- data/features/elements/markdown.feature +9 -0
- data/features/elements/page.feature +10 -0
- data/features/elements/pages/exception_page.feature +10 -0
- data/features/step_definitions/default_macros.rb +1 -1
- data/features/step_definitions/default_steps.rb +7 -3
- data/features/support/env.rb +1 -1
- data/lib/ruby_app/application.rb +16 -41
- data/lib/ruby_app/configuration.rb +9 -17
- data/lib/ruby_app/element.rb +27 -23
- data/lib/ruby_app/elements/base/base_page.js.haml +1 -1
- data/lib/ruby_app/elements/base/base_page.rb +5 -5
- data/lib/ruby_app/elements/list.js.haml +1 -1
- data/lib/ruby_app/elements/list.rb +5 -5
- data/lib/ruby_app/elements/lists/select.js.haml +1 -1
- data/lib/ruby_app/elements/lists/select.rb +1 -3
- data/lib/ruby_app/elements/markdown.js.haml +1 -1
- data/lib/ruby_app/elements/markdown.rb +5 -5
- data/lib/ruby_app/elements/navigation/base/base_breadcrumbs.js.haml +1 -1
- data/lib/ruby_app/elements/navigation/base/base_breadcrumbs.rb +3 -3
- data/lib/ruby_app/elements/navigation/page_link.js.haml +1 -1
- data/lib/ruby_app/elements/navigation/page_link.rb +3 -3
- data/lib/ruby_app/elements/navigation/page_menu.js.haml +1 -1
- data/lib/ruby_app/elements/navigation/page_menu.rb +3 -3
- data/lib/ruby_app/elements/pages/authentication/open_id/authentication_page.rb +2 -2
- data/lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb +2 -2
- data/lib/ruby_app/elements/pages/authentication/open_id/google_authentication_page.rb +1 -1
- data/lib/ruby_app/elements/pages/authentication/open_id/my_open_id_authentication_page.rb +1 -1
- data/lib/ruby_app/elements/pages/authentication/open_id/yahoo_authentication_page.rb +1 -1
- data/lib/ruby_app/elements/pages/default_page.rb +1 -1
- data/lib/ruby_app/elements/pages/exception_page.html.haml +0 -2
- data/lib/ruby_app/elements/pages/settings_page.rb +2 -2
- data/lib/ruby_app/elements/pages/test_pages/button_test_page.css.haml +3 -0
- data/lib/ruby_app/elements/pages/test_pages/button_test_page.html.haml +7 -0
- data/lib/ruby_app/elements/pages/test_pages/button_test_page.js.haml +3 -0
- data/lib/ruby_app/elements/pages/test_pages/button_test_page.rb +39 -0
- data/lib/ruby_app/elements/pages/test_pages/default_test_page.rb +8 -15
- data/lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb +1 -1
- data/lib/ruby_app/elements/pages/test_pages/exception_test_page.html.haml +5 -0
- data/lib/ruby_app/elements/pages/test_pages/exception_test_page.rb +33 -0
- data/lib/ruby_app/elements/pages/test_pages/input_test_page.css.haml +1 -0
- data/lib/ruby_app/elements/pages/test_pages/input_test_page.html.haml +3 -0
- data/lib/ruby_app/elements/pages/test_pages/input_test_page.js.haml +1 -0
- data/lib/ruby_app/elements/pages/test_pages/input_test_page.rb +2 -0
- data/lib/ruby_app/elements/pages/test_pages/link_test_page.css.haml +3 -0
- data/lib/ruby_app/elements/pages/test_pages/link_test_page.html.haml +7 -0
- data/lib/ruby_app/elements/pages/test_pages/link_test_page.js.haml +3 -0
- data/lib/ruby_app/elements/pages/test_pages/link_test_page.rb +39 -0
- data/lib/ruby_app/elements/pages/test_pages/linked_test_page.css.haml +2 -0
- data/lib/ruby_app/elements/pages/test_pages/linked_test_page.html.haml +5 -0
- data/lib/ruby_app/elements/pages/test_pages/linked_test_page.js.haml +2 -0
- data/lib/ruby_app/elements/pages/test_pages/linked_test_page.rb +30 -0
- data/lib/ruby_app/elements/pages/test_pages/list_test_page.css.haml +1 -0
- data/lib/ruby_app/elements/pages/test_pages/list_test_page.html.haml +2 -1
- data/lib/ruby_app/elements/pages/test_pages/list_test_page.js.haml +1 -0
- data/lib/ruby_app/elements/pages/test_pages/list_test_page.rb +16 -11
- data/lib/ruby_app/elements/pages/test_pages/markdown_test_page.css.haml +2 -0
- data/lib/ruby_app/elements/pages/test_pages/markdown_test_page.html.haml +5 -0
- data/lib/ruby_app/elements/pages/test_pages/markdown_test_page.js.haml +2 -0
- data/lib/ruby_app/elements/pages/test_pages/markdown_test_page.rb +38 -0
- data/lib/ruby_app/elements/pages/test_pages/select_test_page.rb +44 -0
- data/lib/ruby_app/elements/pages/test_pages/test_page.html.haml +14 -0
- data/lib/ruby_app/elements/pages/test_pages/test_page.rb +42 -0
- data/lib/ruby_app/language.rb +9 -12
- data/lib/ruby_app/log.rb +19 -9
- data/lib/ruby_app/mixins/{configuration.rb → configure_mixin.rb} +2 -2
- data/lib/ruby_app/mixins/{delegate.rb → delegate_mixin.rb} +1 -1
- data/lib/ruby_app/mixins/{hash.rb → hash_mixin.rb} +5 -1
- data/lib/ruby_app/mixins/{render.rb → render_mixin.rb} +2 -2
- data/lib/ruby_app/mixins/{route.rb → route_mixin.rb} +5 -5
- data/lib/ruby_app/mixins/{template.rb → template_mixin.rb} +11 -11
- data/lib/ruby_app/mixins/{translate.rb → translate_mixin.rb} +1 -1
- data/lib/ruby_app/rack/application.rb +3 -3
- data/lib/ruby_app/rack/route.rb +14 -30
- data/lib/ruby_app/request.rb +36 -13
- data/lib/ruby_app/session.rb +17 -23
- data/lib/ruby_app/translations/en.yml +77 -15
- data/lib/ruby_app/version.rb +1 -1
- data/rakefile +1 -12
- data/spec/application_spec.rb +25 -0
- data/spec/configuration_spec.rb +25 -0
- data/spec/element_spec.rb +54 -5
- data/spec/elements/navigation/breadcrumbs_spec.rb +17 -25
- data/spec/elements/page_spec.rb +2 -13
- data/spec/language_spec.rb +25 -0
- data/spec/log_spec.rb +25 -0
- data/spec/mixins/configure_mixin_spec.rb +24 -0
- data/spec/mixins/delegate_mixin_spec.rb +28 -0
- data/spec/mixins/hash_mixin_spec.rb +39 -0
- data/spec/mixins/render_mixin_spec.rb +127 -0
- data/spec/mixins/route_mixin_spec.rb +60 -0
- data/spec/mixins/{template_spec.rb → template_mixin_spec.rb} +3 -3
- data/spec/mixins/test_a.css.haml +4 -3
- data/spec/mixins/test_a.html.haml +0 -1
- data/spec/mixins/test_a.js.haml +4 -3
- data/spec/mixins/test_b.css.haml +4 -4
- data/spec/mixins/test_b.js.haml +2 -2
- data/spec/mixins/test_c.css.haml +4 -4
- data/spec/mixins/test_c.js.haml +2 -2
- data/spec/mixins/translate_mixin_spec.rb +25 -0
- data/spec/request_spec.rb +25 -0
- data/spec/session_spec.rb +39 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/support/shared.rb +19 -5
- metadata +75 -38
- data/features/breadcrumbs.feature +0 -11
- data/features/content.feature +0 -16
- data/features/exception.feature +0 -53
- data/features/input.feature +0 -13
- data/features/list.feature +0 -12
- data/features/month.feature +0 -14
- data/spec/mixins/render_spec.rb +0 -191
- data/spec/mixins/route_spec.rb +0 -60
- data/spec/mixins/test_e.html.haml +0 -2
- data/spec/mixins/test_f.html.haml +0 -2
- data/spec/mixins/test_g.css.haml +0 -4
data/spec/spec_helper.rb
CHANGED
data/spec/support/shared.rb
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
require 'ruby_app/application'
|
2
2
|
|
3
|
-
shared_context 'RubyApp::
|
3
|
+
shared_context 'RubyApp::Application' do
|
4
4
|
|
5
5
|
before(:all) do
|
6
|
-
RubyApp::Application.create
|
6
|
+
RubyApp::Application.create!
|
7
7
|
end
|
8
8
|
|
9
|
-
let(:environment) { {} }
|
10
|
-
|
11
9
|
after(:all) do
|
12
|
-
RubyApp::Application.destroy
|
10
|
+
RubyApp::Application.destroy!
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'ruby_app/request'
|
16
|
+
|
17
|
+
shared_context 'RubyApp::Request' do
|
18
|
+
include_context 'RubyApp::Application'
|
19
|
+
|
20
|
+
before(:each) do
|
21
|
+
RubyApp::Request.create!
|
22
|
+
end
|
23
|
+
|
24
|
+
after(:each) do
|
25
|
+
RubyApp::Request.destroy!
|
13
26
|
end
|
14
27
|
|
15
28
|
end
|
29
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RubyApp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Frank G. Ficnar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-09 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -329,14 +329,15 @@ files:
|
|
329
329
|
- README.md
|
330
330
|
- bin/console.rb
|
331
331
|
- bin/ruby_app
|
332
|
-
- features/breadcrumbs.feature
|
333
|
-
- features/content.feature
|
334
332
|
- features/default.feature
|
335
|
-
- features/
|
336
|
-
- features/
|
337
|
-
- features/input.feature
|
338
|
-
- features/
|
339
|
-
- features/
|
333
|
+
- features/elements/button.feature
|
334
|
+
- features/elements/dialog.feature
|
335
|
+
- features/elements/input.feature
|
336
|
+
- features/elements/link.feature
|
337
|
+
- features/elements/list.feature
|
338
|
+
- features/elements/markdown.feature
|
339
|
+
- features/elements/page.feature
|
340
|
+
- features/elements/pages/exception_page.feature
|
340
341
|
- features/step_definitions/default_macros.rb
|
341
342
|
- features/step_definitions/default_steps.rb
|
342
343
|
- features/support/env.rb
|
@@ -444,6 +445,10 @@ files:
|
|
444
445
|
- lib/ruby_app/elements/pages/settings_page.html.haml
|
445
446
|
- lib/ruby_app/elements/pages/settings_page.js.haml
|
446
447
|
- lib/ruby_app/elements/pages/settings_page.rb
|
448
|
+
- lib/ruby_app/elements/pages/test_pages/button_test_page.css.haml
|
449
|
+
- lib/ruby_app/elements/pages/test_pages/button_test_page.html.haml
|
450
|
+
- lib/ruby_app/elements/pages/test_pages/button_test_page.js.haml
|
451
|
+
- lib/ruby_app/elements/pages/test_pages/button_test_page.rb
|
447
452
|
- lib/ruby_app/elements/pages/test_pages/default_test_page.css.haml
|
448
453
|
- lib/ruby_app/elements/pages/test_pages/default_test_page.html.haml
|
449
454
|
- lib/ruby_app/elements/pages/test_pages/default_test_page.js.haml
|
@@ -452,23 +457,40 @@ files:
|
|
452
457
|
- lib/ruby_app/elements/pages/test_pages/dialog_test_page.html.haml
|
453
458
|
- lib/ruby_app/elements/pages/test_pages/dialog_test_page.js.haml
|
454
459
|
- lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb
|
460
|
+
- lib/ruby_app/elements/pages/test_pages/exception_test_page.html.haml
|
461
|
+
- lib/ruby_app/elements/pages/test_pages/exception_test_page.rb
|
455
462
|
- lib/ruby_app/elements/pages/test_pages/input_test_page.css.haml
|
456
463
|
- lib/ruby_app/elements/pages/test_pages/input_test_page.html.haml
|
457
464
|
- lib/ruby_app/elements/pages/test_pages/input_test_page.js.haml
|
458
465
|
- lib/ruby_app/elements/pages/test_pages/input_test_page.rb
|
466
|
+
- lib/ruby_app/elements/pages/test_pages/link_test_page.css.haml
|
467
|
+
- lib/ruby_app/elements/pages/test_pages/link_test_page.html.haml
|
468
|
+
- lib/ruby_app/elements/pages/test_pages/link_test_page.js.haml
|
469
|
+
- lib/ruby_app/elements/pages/test_pages/link_test_page.rb
|
470
|
+
- lib/ruby_app/elements/pages/test_pages/linked_test_page.css.haml
|
471
|
+
- lib/ruby_app/elements/pages/test_pages/linked_test_page.html.haml
|
472
|
+
- lib/ruby_app/elements/pages/test_pages/linked_test_page.js.haml
|
473
|
+
- lib/ruby_app/elements/pages/test_pages/linked_test_page.rb
|
459
474
|
- lib/ruby_app/elements/pages/test_pages/list_test_page.css.haml
|
460
475
|
- lib/ruby_app/elements/pages/test_pages/list_test_page.html.haml
|
461
476
|
- lib/ruby_app/elements/pages/test_pages/list_test_page.js.haml
|
462
477
|
- lib/ruby_app/elements/pages/test_pages/list_test_page.rb
|
478
|
+
- lib/ruby_app/elements/pages/test_pages/markdown_test_page.css.haml
|
479
|
+
- lib/ruby_app/elements/pages/test_pages/markdown_test_page.html.haml
|
480
|
+
- lib/ruby_app/elements/pages/test_pages/markdown_test_page.js.haml
|
481
|
+
- lib/ruby_app/elements/pages/test_pages/markdown_test_page.rb
|
482
|
+
- lib/ruby_app/elements/pages/test_pages/select_test_page.rb
|
483
|
+
- lib/ruby_app/elements/pages/test_pages/test_page.html.haml
|
484
|
+
- lib/ruby_app/elements/pages/test_pages/test_page.rb
|
463
485
|
- lib/ruby_app/language.rb
|
464
486
|
- lib/ruby_app/log.rb
|
465
|
-
- lib/ruby_app/mixins/
|
466
|
-
- lib/ruby_app/mixins/
|
467
|
-
- lib/ruby_app/mixins/
|
468
|
-
- lib/ruby_app/mixins/
|
469
|
-
- lib/ruby_app/mixins/
|
470
|
-
- lib/ruby_app/mixins/
|
471
|
-
- lib/ruby_app/mixins/
|
487
|
+
- lib/ruby_app/mixins/configure_mixin.rb
|
488
|
+
- lib/ruby_app/mixins/delegate_mixin.rb
|
489
|
+
- lib/ruby_app/mixins/hash_mixin.rb
|
490
|
+
- lib/ruby_app/mixins/render_mixin.rb
|
491
|
+
- lib/ruby_app/mixins/route_mixin.rb
|
492
|
+
- lib/ruby_app/mixins/template_mixin.rb
|
493
|
+
- lib/ruby_app/mixins/translate_mixin.rb
|
472
494
|
- lib/ruby_app/rack/application.rb
|
473
495
|
- lib/ruby_app/rack/route.rb
|
474
496
|
- lib/ruby_app/request.rb
|
@@ -520,12 +542,19 @@ files:
|
|
520
542
|
- lib/ruby_app/version.rb
|
521
543
|
- rakefile
|
522
544
|
- ruby_app.gemspec
|
545
|
+
- spec/application_spec.rb
|
546
|
+
- spec/configuration_spec.rb
|
523
547
|
- spec/element_spec.rb
|
524
548
|
- spec/elements/navigation/breadcrumbs_spec.rb
|
525
549
|
- spec/elements/page_spec.rb
|
526
|
-
- spec/
|
527
|
-
- spec/
|
528
|
-
- spec/mixins/
|
550
|
+
- spec/language_spec.rb
|
551
|
+
- spec/log_spec.rb
|
552
|
+
- spec/mixins/configure_mixin_spec.rb
|
553
|
+
- spec/mixins/delegate_mixin_spec.rb
|
554
|
+
- spec/mixins/hash_mixin_spec.rb
|
555
|
+
- spec/mixins/render_mixin_spec.rb
|
556
|
+
- spec/mixins/route_mixin_spec.rb
|
557
|
+
- spec/mixins/template_mixin_spec.rb
|
529
558
|
- spec/mixins/test_a.css.haml
|
530
559
|
- spec/mixins/test_a.html.haml
|
531
560
|
- spec/mixins/test_a.js.haml
|
@@ -535,9 +564,9 @@ files:
|
|
535
564
|
- spec/mixins/test_c.css.haml
|
536
565
|
- spec/mixins/test_c.html.haml
|
537
566
|
- spec/mixins/test_c.js.haml
|
538
|
-
- spec/mixins/
|
539
|
-
- spec/
|
540
|
-
- spec/
|
567
|
+
- spec/mixins/translate_mixin_spec.rb
|
568
|
+
- spec/request_spec.rb
|
569
|
+
- spec/session_spec.rb
|
541
570
|
- spec/spec_helper.rb
|
542
571
|
- spec/support/shared.rb
|
543
572
|
homepage: ""
|
@@ -569,28 +598,36 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
569
598
|
requirements: []
|
570
599
|
|
571
600
|
rubyforge_project:
|
572
|
-
rubygems_version: 1.8.
|
601
|
+
rubygems_version: 1.8.10
|
573
602
|
signing_key:
|
574
603
|
specification_version: 3
|
575
604
|
summary: A web application framework in Ruby
|
576
605
|
test_files:
|
577
|
-
- features/breadcrumbs.feature
|
578
|
-
- features/content.feature
|
579
606
|
- features/default.feature
|
580
|
-
- features/
|
581
|
-
- features/
|
582
|
-
- features/input.feature
|
583
|
-
- features/
|
584
|
-
- features/
|
607
|
+
- features/elements/button.feature
|
608
|
+
- features/elements/dialog.feature
|
609
|
+
- features/elements/input.feature
|
610
|
+
- features/elements/link.feature
|
611
|
+
- features/elements/list.feature
|
612
|
+
- features/elements/markdown.feature
|
613
|
+
- features/elements/page.feature
|
614
|
+
- features/elements/pages/exception_page.feature
|
585
615
|
- features/step_definitions/default_macros.rb
|
586
616
|
- features/step_definitions/default_steps.rb
|
587
617
|
- features/support/env.rb
|
618
|
+
- spec/application_spec.rb
|
619
|
+
- spec/configuration_spec.rb
|
588
620
|
- spec/element_spec.rb
|
589
621
|
- spec/elements/navigation/breadcrumbs_spec.rb
|
590
622
|
- spec/elements/page_spec.rb
|
591
|
-
- spec/
|
592
|
-
- spec/
|
593
|
-
- spec/mixins/
|
623
|
+
- spec/language_spec.rb
|
624
|
+
- spec/log_spec.rb
|
625
|
+
- spec/mixins/configure_mixin_spec.rb
|
626
|
+
- spec/mixins/delegate_mixin_spec.rb
|
627
|
+
- spec/mixins/hash_mixin_spec.rb
|
628
|
+
- spec/mixins/render_mixin_spec.rb
|
629
|
+
- spec/mixins/route_mixin_spec.rb
|
630
|
+
- spec/mixins/template_mixin_spec.rb
|
594
631
|
- spec/mixins/test_a.css.haml
|
595
632
|
- spec/mixins/test_a.html.haml
|
596
633
|
- spec/mixins/test_a.js.haml
|
@@ -600,8 +637,8 @@ test_files:
|
|
600
637
|
- spec/mixins/test_c.css.haml
|
601
638
|
- spec/mixins/test_c.html.haml
|
602
639
|
- spec/mixins/test_c.js.haml
|
603
|
-
- spec/mixins/
|
604
|
-
- spec/
|
605
|
-
- spec/
|
640
|
+
- spec/mixins/translate_mixin_spec.rb
|
641
|
+
- spec/request_spec.rb
|
642
|
+
- spec/session_spec.rb
|
606
643
|
- spec/spec_helper.rb
|
607
644
|
- spec/support/shared.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: Interact with the breadcrumbs
|
2
|
-
|
3
|
-
@broken
|
4
|
-
Scenario: View the breadcrumbs test page
|
5
|
-
Given I go to the test pages
|
6
|
-
When I click "Breadcrumbs Test Page"
|
7
|
-
Then I should see "Add"
|
8
|
-
When I click "Add"
|
9
|
-
And I click "Breadcrumbs Test Page"
|
10
|
-
Then I should see "Add"
|
11
|
-
And I quit
|
data/features/content.feature
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
Feature: Clicking a link in content
|
2
|
-
|
3
|
-
@broken
|
4
|
-
Scenario: Clicking a link in content
|
5
|
-
Given I go to the test pages
|
6
|
-
When I click "Content Test Page"
|
7
|
-
Then I should see "Click this one to go somewhere and this other one to go somewhere else."
|
8
|
-
When I click "this one"
|
9
|
-
Then I should see "You selected ..."
|
10
|
-
And I should see "google"
|
11
|
-
When I click "Close"
|
12
|
-
And I click "this other one"
|
13
|
-
Then I should see "You selected ..."
|
14
|
-
And I should see "yahoo"
|
15
|
-
When I click "Close"
|
16
|
-
And I quit
|
data/features/exception.feature
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
Feature: View a variety of exception handling pages
|
2
|
-
|
3
|
-
@broken
|
4
|
-
Scenario: View the exception test page
|
5
|
-
Given I go to the test pages
|
6
|
-
When I click "Exception Test Page"
|
7
|
-
Then I should see "Displayed 1 times"
|
8
|
-
When I refresh the page
|
9
|
-
Then I should see "Displayed 2 times"
|
10
|
-
When I refresh the page
|
11
|
-
Then I should see "Displayed 3 times"
|
12
|
-
When I refresh the page
|
13
|
-
Then I should see "Displayed 4 times"
|
14
|
-
When I refresh the page
|
15
|
-
Then I should see "Displayed 5 times"
|
16
|
-
When I refresh the page
|
17
|
-
Then I should see "RuntimeError"
|
18
|
-
And I should see "Displayed more than 5 times"
|
19
|
-
When I refresh the page
|
20
|
-
And I refresh the page
|
21
|
-
Then I should see "Displayed 2 times"
|
22
|
-
And I quit
|
23
|
-
|
24
|
-
@broken
|
25
|
-
Scenario: View the update exception test page
|
26
|
-
Given I go to the test pages
|
27
|
-
When I click "Exception Test Page"
|
28
|
-
Then I should see "Updated 1 times"
|
29
|
-
When I click "Update"
|
30
|
-
Then I should see "Updated 2 times"
|
31
|
-
When I click "Update"
|
32
|
-
Then I should see "Updated 3 times"
|
33
|
-
When I click "Update"
|
34
|
-
Then I should see "Updated 4 times"
|
35
|
-
When I click "Update"
|
36
|
-
Then I should see "Updated 5 times"
|
37
|
-
When I click "Update"
|
38
|
-
Then I should see "RuntimeError"
|
39
|
-
And I should see "Updated more than 5 times"
|
40
|
-
When I refresh the page
|
41
|
-
Then I should see "Updated 1 times"
|
42
|
-
And I quit
|
43
|
-
|
44
|
-
@broken
|
45
|
-
Scenario: View the dialog exception test page
|
46
|
-
Given I go to the test pages
|
47
|
-
When I click "Exception Test Page"
|
48
|
-
Then I should see "Show dialog"
|
49
|
-
When I click "Show dialog"
|
50
|
-
Then I should see "Dialog exception"
|
51
|
-
When I click "Close"
|
52
|
-
Then I should not see "Dialog exception"
|
53
|
-
And I quit
|
data/features/input.feature
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Feature: View a variety of input elements
|
2
|
-
|
3
|
-
@broken
|
4
|
-
Scenario: View the text input element
|
5
|
-
Given I go to the test pages
|
6
|
-
When I click "Input Test Page"
|
7
|
-
Then I should see "Enter some text below"
|
8
|
-
And I fill in "Text:" with "Some value" and I press enter
|
9
|
-
Then I should see "You entered ..."
|
10
|
-
And I should see "Some value"
|
11
|
-
When I click "Close"
|
12
|
-
Then I should not see "You entered ..."
|
13
|
-
And I quit
|
data/features/list.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: List Test Page
|
2
|
-
|
3
|
-
Scenario: Select an item from a list
|
4
|
-
Given I go to the test pages
|
5
|
-
Then I should see "ListTestPage"
|
6
|
-
When I click "ListTestPage"
|
7
|
-
Then I should see "Item 06"
|
8
|
-
When I click "Item 06"
|
9
|
-
And I should see "You selected the item 'Item 06'"
|
10
|
-
When I click "Close"
|
11
|
-
And I should not see "You selected the item 'Item 06'"
|
12
|
-
Then I quit
|
data/features/month.feature
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: Month Calendar Test Page
|
2
|
-
|
3
|
-
@broken
|
4
|
-
Scenario: Select a date
|
5
|
-
Given I go to the test pages
|
6
|
-
Then I should see "Monthly Calendar Test Page"
|
7
|
-
When I click "Monthly Calendar Test Page"
|
8
|
-
Then I should see "Change the month displayed to January 2000"
|
9
|
-
When I click "January 2000"
|
10
|
-
And I click "19"
|
11
|
-
Then I should see "19/01/2000"
|
12
|
-
When I click "Close"
|
13
|
-
And I click "back"
|
14
|
-
Then I quit
|
data/spec/mixins/render_spec.rb
DELETED
@@ -1,191 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler/setup'
|
3
|
-
|
4
|
-
require 'haml'
|
5
|
-
|
6
|
-
require 'ruby_app/mixins/render'
|
7
|
-
require 'ruby_app/mixins/template'
|
8
|
-
|
9
|
-
describe RubyApp::Mixins::Render do
|
10
|
-
|
11
|
-
before(:all) do
|
12
|
-
|
13
|
-
class TestA
|
14
|
-
extend RubyApp::Mixins::Template
|
15
|
-
include Haml::Helpers
|
16
|
-
extend Haml::Helpers
|
17
|
-
extend RubyApp::Mixins::Render
|
18
|
-
include RubyApp::Mixins::Render
|
19
|
-
template_path(:all, File.dirname(__FILE__))
|
20
|
-
end
|
21
|
-
|
22
|
-
class TestB < TestA
|
23
|
-
template_path(:all, File.dirname(__FILE__))
|
24
|
-
end
|
25
|
-
|
26
|
-
class TestC < TestA
|
27
|
-
template_path(:all, File.dirname(__FILE__))
|
28
|
-
exclude_parent_template(:html)
|
29
|
-
end
|
30
|
-
|
31
|
-
class TestD < TestC
|
32
|
-
template_path(:all, File.dirname(__FILE__))
|
33
|
-
end
|
34
|
-
|
35
|
-
class TestE
|
36
|
-
extend RubyApp::Mixins::Template
|
37
|
-
include Haml::Helpers
|
38
|
-
extend Haml::Helpers
|
39
|
-
extend RubyApp::Mixins::Render
|
40
|
-
include RubyApp::Mixins::Render
|
41
|
-
template_path(:all, File.dirname(__FILE__))
|
42
|
-
end
|
43
|
-
|
44
|
-
class TestF < TestE
|
45
|
-
template_path(:all, File.dirname(__FILE__))
|
46
|
-
end
|
47
|
-
|
48
|
-
class TestG < TestB
|
49
|
-
template_path(:all, File.dirname(__FILE__))
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
describe 'positive' do
|
55
|
-
|
56
|
-
describe 'render a class' do
|
57
|
-
|
58
|
-
specify { TestA.render(:html).should include('<!-- TestA -->') }
|
59
|
-
specify { TestA.render(:html).scan(/TestA/).length.should == 1 }
|
60
|
-
specify { TestA.render(:css).should include('/* TestA */') }
|
61
|
-
specify { TestA.render(:css).scan(/TestA/).length.should == 1 }
|
62
|
-
specify { TestA.render(:js).should include('// TestA') }
|
63
|
-
specify { TestA.render(:js).scan(/TestA/).length.should == 1 }
|
64
|
-
|
65
|
-
describe 'render an including all derived class' do
|
66
|
-
|
67
|
-
specify { TestB.render(:html).should include('<!-- TestA -->') }
|
68
|
-
specify { TestB.render(:html).should include('<!-- TestB -->') }
|
69
|
-
specify { TestB.render(:css).should include('/* TestA */') }
|
70
|
-
specify { TestB.render(:css).should include('/* TestB */') }
|
71
|
-
specify { TestB.render(:js).should include('// TestA') }
|
72
|
-
specify { TestB.render(:js).should include('// TestB') }
|
73
|
-
|
74
|
-
specify { TestF.render(:html).scan(/TestF/).length.should == 1 }
|
75
|
-
specify { TestF.render(:html).scan(/TestF/).length.should == 1 }
|
76
|
-
specify { TestF.render(:html).scan(/TestF/).length.should == 1 }
|
77
|
-
|
78
|
-
end
|
79
|
-
|
80
|
-
describe 'render an including some derived class' do
|
81
|
-
|
82
|
-
specify { TestC.render(:html).should include('<!-- TestC -->') }
|
83
|
-
specify { TestC.render(:css).should include('/* TestA */') }
|
84
|
-
specify { TestC.render(:css).should include('/* TestC */') }
|
85
|
-
specify { TestC.render(:js).should include('// TestA') }
|
86
|
-
specify { TestC.render(:js).should include('// TestC') }
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
describe 'render a derived class with no templates' do
|
91
|
-
|
92
|
-
specify { TestD.render(:html).should include('<!-- TestC -->') }
|
93
|
-
specify { TestD.render(:css).should include('/* TestA */') }
|
94
|
-
specify { TestD.render(:css).should include('/* TestC */') }
|
95
|
-
specify { TestD.render(:js).should include('// TestA') }
|
96
|
-
specify { TestD.render(:js).should include('// TestC') }
|
97
|
-
|
98
|
-
end
|
99
|
-
|
100
|
-
describe 'render a derived class in multiple threads' do
|
101
|
-
|
102
|
-
specify { TestG.render(:css).should include('/* TestA */') }
|
103
|
-
specify { TestG.render(:css).should include('/* TestB */') }
|
104
|
-
specify { TestG.render(:css).should include('/* TestG */') }
|
105
|
-
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
109
|
-
|
110
|
-
describe 'render an instance' do
|
111
|
-
|
112
|
-
let(:instance_a) { TestA.new }
|
113
|
-
let(:instance_b) { TestB.new }
|
114
|
-
let(:instance_c) { TestC.new }
|
115
|
-
let(:instance_d) { TestD.new }
|
116
|
-
let(:instance_e) { TestE.new }
|
117
|
-
let(:instance_f) { TestF.new }
|
118
|
-
|
119
|
-
specify { instance_a.render(:html).should include('<!-- TestA -->') }
|
120
|
-
specify { instance_a.render(:html).scan(/TestA/).length.should == 1 }
|
121
|
-
specify { instance_a.render(:css).should include('/* TestA */') }
|
122
|
-
specify { instance_a.render(:css).scan(/TestA/).length.should == 1 }
|
123
|
-
specify { instance_a.render(:js).should include('// TestA') }
|
124
|
-
specify { instance_a.render(:js).scan(/TestA/).length.should == 1 }
|
125
|
-
|
126
|
-
describe 'render an include all derived instance' do
|
127
|
-
|
128
|
-
specify { instance_b.render(:html).should include('<!-- TestA -->') }
|
129
|
-
specify { instance_b.render(:html).should include('<!-- TestB -->') }
|
130
|
-
specify { instance_b.render(:css).should include('/* TestA */') }
|
131
|
-
specify { instance_b.render(:css).should include('/* TestB */') }
|
132
|
-
specify { instance_b.render(:js).should include('// TestA') }
|
133
|
-
specify { instance_b.render(:js).should include('// TestB') }
|
134
|
-
|
135
|
-
specify { instance_f.render(:html).scan(/TestF/).length.should == 1 }
|
136
|
-
specify { instance_f.render(:html).scan(/TestF/).length.should == 1 }
|
137
|
-
specify { instance_f.render(:html).scan(/TestF/).length.should == 1 }
|
138
|
-
|
139
|
-
end
|
140
|
-
|
141
|
-
describe 'render an include some derived instance' do
|
142
|
-
|
143
|
-
specify { instance_c.render(:html).should include('<!-- TestC -->') }
|
144
|
-
specify { instance_c.render(:css).should include('/* TestA */') }
|
145
|
-
specify { instance_c.render(:css).should include('/* TestC */') }
|
146
|
-
specify { instance_c.render(:js).should include('// TestA') }
|
147
|
-
specify { instance_c.render(:js).should include('// TestC') }
|
148
|
-
|
149
|
-
end
|
150
|
-
|
151
|
-
describe 'render a derived instance with no templates' do
|
152
|
-
|
153
|
-
specify { instance_d.render(:html).should include('<!-- TestC -->') }
|
154
|
-
specify { instance_d.render(:css).should include('/* TestA */') }
|
155
|
-
specify { instance_d.render(:css).should include('/* TestC */') }
|
156
|
-
specify { instance_d.render(:js).should include('// TestA') }
|
157
|
-
specify { instance_d.render(:js).should include('// TestC') }
|
158
|
-
|
159
|
-
end
|
160
|
-
|
161
|
-
end
|
162
|
-
|
163
|
-
end
|
164
|
-
|
165
|
-
describe 'negative' do
|
166
|
-
|
167
|
-
describe 'should not render a class' do
|
168
|
-
|
169
|
-
describe 'should not render an include some derived class' do
|
170
|
-
|
171
|
-
specify { TestC.render(:html).should_not include('<!-- TestA -->') }
|
172
|
-
|
173
|
-
end
|
174
|
-
|
175
|
-
end
|
176
|
-
|
177
|
-
describe 'should not render an instance' do
|
178
|
-
|
179
|
-
let(:instance_c) { TestC.new }
|
180
|
-
|
181
|
-
describe 'should not render an include some derived instance' do
|
182
|
-
|
183
|
-
specify { instance_c.render(:html).should_not include('<!-- TestA -->') }
|
184
|
-
|
185
|
-
end
|
186
|
-
|
187
|
-
end
|
188
|
-
|
189
|
-
end
|
190
|
-
|
191
|
-
end
|