RubyApp 0.0.91 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/.rvmrc +56 -1
- data/Gemfile.lock +22 -22
- data/bin/console.rb +9 -1
- data/bin/ruby_app +2 -24
- data/features/default.feature +1 -0
- data/features/elements/input.feature +2 -0
- data/features/elements/page.feature +0 -9
- data/features/step_definitions/default_macros.rb +1 -4
- data/features/step_definitions/default_steps.rb +1 -1
- data/lib/ruby_app.rb +8 -1
- data/lib/ruby_app/application.rb +5 -67
- data/lib/ruby_app/configuration.rb +2 -3
- data/lib/ruby_app/configuration.ru +32 -0
- data/lib/ruby_app/configuration.yml +28 -0
- data/lib/ruby_app/element.rb +12 -6
- data/lib/ruby_app/elements.rb +50 -0
- data/lib/ruby_app/elements/base/base_mail.rb +2 -2
- data/lib/ruby_app/elements/base/base_page.html.haml +1 -1
- data/lib/ruby_app/elements/base/base_page.js.haml +3 -3
- data/lib/ruby_app/elements/base/base_page.rb +2 -2
- data/lib/ruby_app/elements/dialogs/base/base_ok_dialog.rb +0 -1
- data/lib/ruby_app/elements/dialogs/blank_dialog.rb +1 -1
- data/lib/ruby_app/elements/dialogs/exception_dialog.rb +1 -2
- data/lib/ruby_app/elements/navigation/back_button.rb +1 -1
- data/lib/ruby_app/elements/navigation/base/base_breadcrumbs.rb +1 -0
- data/lib/ruby_app/elements/navigation/page_link.rb +1 -0
- data/lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb +1 -1
- data/lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.rb +1 -3
- data/lib/ruby_app/elements/pages/authentication/open_id/email_authentication_page.rb +1 -1
- data/lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb +1 -1
- data/lib/ruby_app/elements/pages/base/base_blank_page.rb +0 -1
- data/lib/ruby_app/elements/pages/default_page.rb +2 -1
- data/lib/ruby_app/elements/pages/quit_page.html.haml +0 -3
- data/lib/ruby_app/elements/pages/quit_page.rb +0 -2
- data/lib/ruby_app/elements/pages/settings_page.rb +2 -1
- data/lib/ruby_app/elements/pages/test_pages.rb +9 -0
- data/lib/ruby_app/elements/pages/test_pages/button_test_page.rb +3 -5
- data/lib/ruby_app/elements/pages/test_pages/default_test_page.rb +10 -15
- data/lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb +2 -8
- data/lib/ruby_app/elements/pages/test_pages/input_test_page.rb +2 -9
- data/lib/ruby_app/elements/pages/test_pages/link_test_page.rb +3 -5
- data/lib/ruby_app/elements/pages/test_pages/linked_test_page.rb +1 -2
- data/lib/ruby_app/elements/pages/test_pages/list_test_page.rb +4 -8
- data/lib/ruby_app/elements/pages/test_pages/markdown_test_page.rb +3 -4
- data/lib/ruby_app/elements/pages/test_pages/test_page.rb +3 -8
- data/lib/ruby_app/exceptions.rb +2 -0
- data/lib/ruby_app/exceptions/base/base_exception.rb +1 -1
- data/lib/ruby_app/language.rb +9 -15
- data/lib/ruby_app/log.rb +32 -28
- data/lib/ruby_app/mixins.rb +7 -0
- data/lib/ruby_app/mixins/configuration_mixin.rb +1 -1
- data/lib/ruby_app/mixins/delegate_mixin.rb +1 -1
- data/lib/ruby_app/mixins/hash_mixin.rb +1 -1
- data/lib/ruby_app/mixins/render_mixin.rb +37 -39
- data/lib/ruby_app/mixins/route_mixin.rb +1 -5
- data/lib/ruby_app/mixins/template_mixin.rb +4 -12
- data/lib/ruby_app/mixins/translate_mixin.rb +2 -2
- data/lib/ruby_app/rack.rb +8 -0
- data/lib/ruby_app/rack/application.rb +9 -5
- data/lib/ruby_app/rack/duration.rb +22 -0
- data/lib/ruby_app/rack/language.rb +26 -0
- data/lib/ruby_app/rack/memory.rb +22 -0
- data/lib/ruby_app/rack/request.rb +27 -0
- data/lib/ruby_app/rack/response.rb +26 -0
- data/lib/ruby_app/rack/route.rb +24 -87
- data/lib/ruby_app/rack/session.rb +31 -0
- data/lib/ruby_app/request.rb +4 -55
- data/lib/ruby_app/response.rb +58 -0
- data/lib/ruby_app/session.rb +102 -35
- data/lib/ruby_app/templates/application/Rakefile +1 -1
- data/lib/ruby_app/templates/application/configuration.ru +41 -0
- data/lib/ruby_app/templates/application/configuration.yml +16 -0
- data/lib/ruby_app/templates/application/console.rb +15 -10
- data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_.rb +3 -0
- data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_/application.rb +3 -3
- data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_/elements/pages/default_page.rb +1 -1
- data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_/session.rb +3 -3
- data/lib/ruby_app/templates/application/spec/application_spec.rb +17 -0
- data/lib/ruby_app/templates/application/spec/request_spec.rb +18 -0
- data/lib/ruby_app/templates/application/spec/support/shared.rb +34 -9
- data/lib/ruby_app/themes/mobile.rb +1 -17
- data/lib/ruby_app/themes/mobile/base/base_page.html.haml +1 -1
- data/lib/ruby_app/translations/en.yml +133 -144
- data/lib/ruby_app/version.rb +1 -1
- data/rakefile +1 -16
- data/spec/application_spec.rb +5 -13
- data/spec/elements/base_element.html.haml +5 -0
- data/spec/elements/container_element.html.haml +6 -0
- data/spec/elements/derived_element.html.haml +5 -0
- data/spec/elements/element_spec.rb +101 -0
- data/spec/request_spec.rb +6 -13
- data/spec/support/shared.rb +14 -6
- metadata +95 -125
- data/features/elements/pages/quit_page.feature +0 -8
- data/lib/ruby_app/config.ru +0 -25
- data/lib/ruby_app/config.yml +0 -16
- data/lib/ruby_app/elements/pages/test_pages/select_test_page.rb +0 -44
- data/lib/ruby_app/templates/application/config.ru +0 -40
- data/lib/ruby_app/templates/application/config.yml +0 -1
- data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.css.haml +0 -3
- data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.html.haml +0 -4
- data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.js.haml +0 -3
- data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.rb +0 -14
- data/spec/configuration_spec.rb +0 -25
- data/spec/element_spec.rb +0 -72
- data/spec/elements/navigation/breadcrumbs_spec.rb +0 -62
- data/spec/elements/page_spec.rb +0 -20
- data/spec/language_spec.rb +0 -25
- data/spec/log_spec.rb +0 -25
- data/spec/mixins/configuration_mixin_spec.rb +0 -24
- data/spec/mixins/delegate_mixin_spec.rb +0 -28
- data/spec/mixins/hash_mixin_spec.rb +0 -39
- data/spec/mixins/render_mixin_spec.rb +0 -127
- data/spec/mixins/route_mixin_spec.rb +0 -60
- data/spec/mixins/template_mixin_spec.rb +0 -78
- data/spec/mixins/test_a.css.haml +0 -4
- data/spec/mixins/test_a.html.haml +0 -2
- data/spec/mixins/test_a.js.haml +0 -4
- data/spec/mixins/test_b.css.haml +0 -4
- data/spec/mixins/test_b.html.haml +0 -3
- data/spec/mixins/test_b.js.haml +0 -4
- data/spec/mixins/test_c.css.haml +0 -4
- data/spec/mixins/test_c.html.haml +0 -2
- data/spec/mixins/test_c.js.haml +0 -4
- data/spec/mixins/translate_mixin_spec.rb +0 -25
- data/spec/session_spec.rb +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'ruby_app/mixins/hash_mixin'
|
2
|
-
|
3
|
-
describe RubyApp::Mixins::HashMixin do
|
4
|
-
|
5
|
-
describe 'positive' do
|
6
|
-
|
7
|
-
before(:all) do
|
8
|
-
|
9
|
-
class TestHashMixin
|
10
|
-
include RubyApp::Mixins::HashMixin
|
11
|
-
|
12
|
-
def initialize
|
13
|
-
@data = { :get_a => TestHashMixin }
|
14
|
-
end
|
15
|
-
|
16
|
-
def [](key)
|
17
|
-
@data[key]
|
18
|
-
end
|
19
|
-
|
20
|
-
def []=(key, value)
|
21
|
-
@data[key] = value
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
let(:instance_a) { TestHashMixin.new }
|
29
|
-
|
30
|
-
specify { instance_a.get_a.should == TestHashMixin }
|
31
|
-
|
32
|
-
specify do
|
33
|
-
instance_a.get_a = RubyApp::Mixins::HashMixin
|
34
|
-
instance_a.get_a.should == RubyApp::Mixins::HashMixin
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
@@ -1,127 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler/setup'
|
3
|
-
|
4
|
-
require 'haml'
|
5
|
-
|
6
|
-
require 'spec_helper'
|
7
|
-
|
8
|
-
require 'ruby_app/mixins/render_mixin'
|
9
|
-
require 'ruby_app/mixins/template_mixin'
|
10
|
-
|
11
|
-
describe RubyApp::Mixins::RenderMixin do
|
12
|
-
include_context 'RubyApp::Request'
|
13
|
-
|
14
|
-
before(:all) do
|
15
|
-
|
16
|
-
class TestA
|
17
|
-
extend RubyApp::Mixins::TemplateMixin
|
18
|
-
extend Haml::Helpers
|
19
|
-
include Haml::Helpers
|
20
|
-
extend RubyApp::Mixins::RenderMixin
|
21
|
-
include RubyApp::Mixins::RenderMixin
|
22
|
-
template_path(:all, File.dirname(__FILE__))
|
23
|
-
end
|
24
|
-
|
25
|
-
class TestB < TestA
|
26
|
-
template_path(:all, File.dirname(__FILE__))
|
27
|
-
end
|
28
|
-
|
29
|
-
class TestC < TestA
|
30
|
-
template_path(:all, File.dirname(__FILE__))
|
31
|
-
exclude_parent_template(:html)
|
32
|
-
end
|
33
|
-
|
34
|
-
class TestD < TestC
|
35
|
-
template_path(:all, File.dirname(__FILE__))
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
describe 'positive' do
|
41
|
-
|
42
|
-
describe 'class' do
|
43
|
-
|
44
|
-
specify { TestA.render(:css).should include('/* TestA */') }
|
45
|
-
specify { TestA.render(:css).scan(/TestA/).length.should == 1 }
|
46
|
-
specify { TestA.render(:js).should include('// TestA') }
|
47
|
-
specify { TestA.render(:js).scan(/TestA/).length.should == 1 }
|
48
|
-
|
49
|
-
describe 'including all derived class' do
|
50
|
-
|
51
|
-
specify { TestB.render(:css).should include('/* TestA */') }
|
52
|
-
specify { TestB.render(:css).should include('/* TestB */') }
|
53
|
-
specify { TestB.render(:js).should include('// TestA') }
|
54
|
-
specify { TestB.render(:js).should include('// TestB') }
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
describe 'including some derived class' do
|
59
|
-
|
60
|
-
specify { TestC.render(:css).should include('/* TestA */') }
|
61
|
-
specify { TestC.render(:css).should include('/* TestC */') }
|
62
|
-
specify { TestC.render(:js).should include('// TestA') }
|
63
|
-
specify { TestC.render(:js).should include('// TestC') }
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
describe 'render a derived class with no templates' do
|
68
|
-
|
69
|
-
specify { TestD.render(:css).should include('/* TestA */') }
|
70
|
-
specify { TestD.render(:css).should include('/* TestC */') }
|
71
|
-
specify { TestD.render(:js).should include('// TestA') }
|
72
|
-
specify { TestD.render(:js).should include('// TestC') }
|
73
|
-
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
|
78
|
-
describe 'instance' do
|
79
|
-
|
80
|
-
let(:instance_a) { TestA.new }
|
81
|
-
let(:instance_b) { TestB.new }
|
82
|
-
let(:instance_c) { TestC.new }
|
83
|
-
let(:instance_d) { TestD.new }
|
84
|
-
|
85
|
-
specify { instance_a.render(:html).should include('<!-- TestA -->') }
|
86
|
-
specify { instance_a.render(:html).scan(/TestA/).length.should == 1 }
|
87
|
-
|
88
|
-
describe 'include all derived instance' do
|
89
|
-
|
90
|
-
specify { instance_b.render(:html).should include('<!-- TestA -->') }
|
91
|
-
specify { instance_b.render(:html).should include('<!-- TestB -->') }
|
92
|
-
|
93
|
-
end
|
94
|
-
|
95
|
-
describe 'include some derived instance' do
|
96
|
-
|
97
|
-
specify { instance_c.render(:html).should include('<!-- TestC -->') }
|
98
|
-
|
99
|
-
end
|
100
|
-
|
101
|
-
describe 'render a derived instance with no templates' do
|
102
|
-
|
103
|
-
specify { instance_d.render(:html).should include('<!-- TestC -->') }
|
104
|
-
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
108
|
-
|
109
|
-
end
|
110
|
-
|
111
|
-
describe 'negative' do
|
112
|
-
|
113
|
-
describe 'instance' do
|
114
|
-
|
115
|
-
describe 'should not include some derived instance' do
|
116
|
-
|
117
|
-
let(:instance_c) { TestC.new }
|
118
|
-
|
119
|
-
specify { instance_c.render(:html).should_not include('<!-- TestA -->') }
|
120
|
-
|
121
|
-
end
|
122
|
-
|
123
|
-
end
|
124
|
-
|
125
|
-
end
|
126
|
-
|
127
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require 'ruby_app/mixins/route_mixin'
|
2
|
-
|
3
|
-
describe RubyApp::Mixins::RouteMixin do
|
4
|
-
|
5
|
-
before(:all) do
|
6
|
-
Object.extend RubyApp::Mixins::RouteMixin
|
7
|
-
end
|
8
|
-
|
9
|
-
before(:each) do
|
10
|
-
@value = false
|
11
|
-
@parameters = nil
|
12
|
-
Object.clear_routes
|
13
|
-
end
|
14
|
-
|
15
|
-
describe 'positive' do
|
16
|
-
|
17
|
-
it 'should match a blank pattern on GET' do
|
18
|
-
Object.route(RubyApp::Mixins::RouteMixin::GET, /^$/) { @value = true }
|
19
|
-
@value.should be_false
|
20
|
-
Object.do_route(RubyApp::Mixins::RouteMixin::GET, '')
|
21
|
-
@value.should be_true
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'should match a pattern on GET' do
|
25
|
-
Object.route(RubyApp::Mixins::RouteMixin::GET, /^pattern$/) { @value = true }
|
26
|
-
@value.should be_false
|
27
|
-
Object.do_route(RubyApp::Mixins::RouteMixin::GET, 'pattern')
|
28
|
-
@value.should be_true
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'should match a pattern on POST' do
|
32
|
-
Object.route(RubyApp::Mixins::RouteMixin::POST, /^pattern$/) { @value = true }
|
33
|
-
@value.should be_false
|
34
|
-
Object.do_route(RubyApp::Mixins::RouteMixin::POST, 'pattern')
|
35
|
-
@value.should be_true
|
36
|
-
end
|
37
|
-
|
38
|
-
it 'should match a pattern on GET with a parameter' do
|
39
|
-
Object.route(RubyApp::Mixins::RouteMixin::GET, /^pattern (.*)$/) { |method, path, parameter| @value, @parameters = true, parameter }
|
40
|
-
@value.should be_false
|
41
|
-
@parameter.should be_nil
|
42
|
-
Object.do_route(RubyApp::Mixins::RouteMixin::GET, 'pattern parameter')
|
43
|
-
@value.should be_true
|
44
|
-
@parameters.should == 'parameter'
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
describe 'negative' do
|
50
|
-
|
51
|
-
it 'should not match a not matching pattern on GET' do
|
52
|
-
Object.route(RubyApp::Mixins::RouteMixin::GET, /^pattern$/) { @value = true }
|
53
|
-
@value.should be_false
|
54
|
-
Object.do_route(RubyApp::Mixins::RouteMixin::GET, 'not matching pattern')
|
55
|
-
@value.should be_false
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
require 'ruby_app/mixins/template_mixin'
|
2
|
-
|
3
|
-
describe RubyApp::Mixins::TemplateMixin do
|
4
|
-
|
5
|
-
before(:all) do
|
6
|
-
|
7
|
-
class TestA
|
8
|
-
extend RubyApp::Mixins::TemplateMixin
|
9
|
-
template_path(:all, File.dirname(__FILE__))
|
10
|
-
end
|
11
|
-
|
12
|
-
class TestB < TestA
|
13
|
-
template_path(:all, File.dirname(__FILE__))
|
14
|
-
end
|
15
|
-
|
16
|
-
class TestC < TestA
|
17
|
-
template_path(:all, File.dirname(__FILE__))
|
18
|
-
exclude_parent_template(:html)
|
19
|
-
end
|
20
|
-
|
21
|
-
class TestD < TestC
|
22
|
-
template_path(:all, File.dirname(__FILE__))
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
describe 'positive' do
|
28
|
-
|
29
|
-
specify { TestA.get_templates(:html).should include File.join(File.dirname(__FILE__), %w[test_a.html.haml]) }
|
30
|
-
specify { TestA.get_templates(:css).should include File.join(File.dirname(__FILE__), %w[test_a.css.haml]) }
|
31
|
-
specify { TestA.get_templates(:js).should include File.join(File.dirname(__FILE__), %w[test_a.js.haml]) }
|
32
|
-
|
33
|
-
describe 'include all parent' do
|
34
|
-
|
35
|
-
specify { TestB.get_templates(:html).should include File.join(File.dirname(__FILE__), %w[test_a.html.haml]) }
|
36
|
-
specify { TestB.get_templates(:html).should include File.join(File.dirname(__FILE__), %w[test_b.html.haml]) }
|
37
|
-
specify { TestB.get_templates(:css).should include File.join(File.dirname(__FILE__), %w[test_a.css.haml]) }
|
38
|
-
specify { TestB.get_templates(:css).should include File.join(File.dirname(__FILE__), %w[test_b.css.haml]) }
|
39
|
-
specify { TestB.get_templates(:js).should include File.join(File.dirname(__FILE__), %w[test_a.js.haml]) }
|
40
|
-
specify { TestB.get_templates(:js).should include File.join(File.dirname(__FILE__), %w[test_b.js.haml]) }
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
describe 'include some parents' do
|
45
|
-
|
46
|
-
specify { TestC.get_templates(:html).should include File.join(File.dirname(__FILE__), %w[test_c.html.haml]) }
|
47
|
-
specify { TestC.get_templates(:css).should include File.join(File.dirname(__FILE__), %w[test_a.css.haml]) }
|
48
|
-
specify { TestC.get_templates(:css).should include File.join(File.dirname(__FILE__), %w[test_c.css.haml]) }
|
49
|
-
specify { TestC.get_templates(:js).should include File.join(File.dirname(__FILE__), %w[test_a.js.haml]) }
|
50
|
-
specify { TestC.get_templates(:js).should include File.join(File.dirname(__FILE__), %w[test_c.js.haml]) }
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
describe 'with no templates' do
|
55
|
-
|
56
|
-
specify { TestD.get_templates(:html).should include File.join(File.dirname(__FILE__), %w[test_c.html.haml]) }
|
57
|
-
specify { TestD.get_templates(:css).should include File.join(File.dirname(__FILE__), %w[test_c.css.haml]) }
|
58
|
-
specify { TestD.get_templates(:js).should include File.join(File.dirname(__FILE__), %w[test_c.js.haml]) }
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
63
|
-
|
64
|
-
describe 'negative' do
|
65
|
-
|
66
|
-
specify { TestA.get_templates(:htm).should_not include File.join(File.dirname(__FILE__), %w[test_a.htm.haml]) }
|
67
|
-
specify { TestA.get_templates(:sass).should_not include File.join(File.dirname(__FILE__), %w[test_a.scss.haml]) }
|
68
|
-
specify { TestA.get_templates(:javascript).should_not include File.join(File.dirname(__FILE__), %w[test_a.javascript.haml]) }
|
69
|
-
|
70
|
-
describe 'include some parents' do
|
71
|
-
|
72
|
-
specify { TestC.get_templates(:html).should_not include File.join(File.dirname(__FILE__), %w[test_a.html.haml]) }
|
73
|
-
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
|
78
|
-
end
|
data/spec/mixins/test_a.css.haml
DELETED
data/spec/mixins/test_a.js.haml
DELETED
data/spec/mixins/test_b.css.haml
DELETED
data/spec/mixins/test_b.js.haml
DELETED
data/spec/mixins/test_c.css.haml
DELETED
data/spec/mixins/test_c.js.haml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
require 'ruby_app/mixins/translate_mixin'
|
4
|
-
|
5
|
-
describe RubyApp::Mixins::TranslateMixin do
|
6
|
-
include_context 'RubyApp::Request'
|
7
|
-
|
8
|
-
describe 'positive' do
|
9
|
-
|
10
|
-
before(:all) do
|
11
|
-
|
12
|
-
class TestTranslateMixin
|
13
|
-
include RubyApp::Mixins::TranslateMixin
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
let(:instance_a) { TestTranslateMixin.new }
|
19
|
-
|
20
|
-
specify { instance_a.should respond_to(:translate) }
|
21
|
-
specify { instance_a.should respond_to(:localize) }
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
data/spec/session_spec.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
require 'ruby_app/session'
|
4
|
-
|
5
|
-
describe RubyApp::Session do
|
6
|
-
include_context 'RubyApp::Request'
|
7
|
-
|
8
|
-
describe 'positive' do
|
9
|
-
|
10
|
-
describe 'class' do
|
11
|
-
|
12
|
-
specify { RubyApp::Session.should respond_to('create!') }
|
13
|
-
specify { RubyApp::Session.should respond_to('get') }
|
14
|
-
specify { RubyApp::Session.should respond_to('destroy!') }
|
15
|
-
|
16
|
-
specify { RubyApp::Session.get.should_not be_nil }
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
describe 'instance' do
|
21
|
-
|
22
|
-
let(:session) { RubyApp::Session.get }
|
23
|
-
|
24
|
-
specify { session.should respond_to('pages') }
|
25
|
-
specify { session.should respond_to('[]') }
|
26
|
-
specify { session.should respond_to('[]=') }
|
27
|
-
specify { session.should respond_to('identity') }
|
28
|
-
specify { session.should respond_to('identity=') }
|
29
|
-
specify { session.should respond_to('show_dialog') }
|
30
|
-
specify { session.should respond_to('quit') }
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
describe 'negative' do
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|