excursion 0.0.9 → 0.0.10

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.
@@ -38,7 +38,7 @@ describe 'Excursion::Datastores::Test' do
38
38
 
39
39
  context 'when the requested key does not exist' do
40
40
  it 'should return a dummy application' do
41
- subject.read('non_existent_key').should be_an_instance_of(Excursion::Pool::DummyApplication)
41
+ subject.read('non_existent_key').should be_an_instance_of(Hash)
42
42
  end
43
43
  end
44
44
 
@@ -41,7 +41,7 @@ describe 'Excursion::Helpers::ApplicationHelper' do
41
41
  end
42
42
 
43
43
  it 'should allow referencing application helper methods directly by name' do
44
- expect { Excursion.url_helpers.dummy }.to_not raise_exception(NoMethodError)
44
+ expect { Excursion.url_helpers.dummy }.to_not raise_exception#(NoMethodError)
45
45
  Excursion.url_helpers.dummy.should eql(Excursion.url_helpers.excursion('dummy'))
46
46
  end
47
47
 
@@ -28,10 +28,11 @@ describe 'Excursion::Helpers::UrlHelper' do
28
28
  end
29
29
 
30
30
  it 'should provide url helper methods for the application named routes' do
31
- expect { Excursion.url_helpers.dummy.root_url }.to_not raise_exception(NoMethodError)
32
- expect { Excursion.url_helpers.dummy.root_path }.to_not raise_exception(NoMethodError)
33
- expect { Excursion.url_helpers.dummy.test_url }.to_not raise_exception(NoMethodError)
34
- expect { Excursion.url_helpers.dummy.test_path }.to_not raise_exception(NoMethodError)
31
+ url_opts = {host: 'http://www.example.com'}
32
+ expect { Excursion.url_helpers.dummy.root_url(url_opts) }.to_not raise_exception
33
+ expect { Excursion.url_helpers.dummy.root_path(url_opts) }.to_not raise_exception
34
+ expect { Excursion.url_helpers.dummy.test_url(url_opts) }.to_not raise_exception
35
+ expect { Excursion.url_helpers.dummy.test_path(url_opts) }.to_not raise_exception
35
36
  end
36
37
 
37
38
  context 'url helper methods' do
@@ -30,7 +30,7 @@ describe 'Excursion' do
30
30
  context '::url_helpers' do
31
31
  it 'should provide access to application url helpers' do
32
32
  Excursion::Pool.register_application(Rails.application)
33
- expect { Excursion.url_helpers.dummy }.to_not raise_exception(NoMethodError)
33
+ expect { Excursion.url_helpers.dummy }.to_not raise_exception#(NoMethodError)
34
34
  end
35
35
  end
36
36
  end
@@ -12,8 +12,8 @@ describe 'Excursion::Pool::Application' do
12
12
  end
13
13
 
14
14
  it 'should accept an optional route collection' do
15
- expect { Excursion::Pool::Application.new 'app_name', {} }.to_not raise_exception(ArgumentError)
16
- expect { Excursion::Pool::Application.new 'app_name', {}, {} }.to_not raise_exception(ArgumentError)
15
+ expect { Excursion::Pool::Application.new 'app_name', {} }.to_not raise_exception#(ArgumentError)
16
+ expect { Excursion::Pool::Application.new 'app_name', {}, {} }.to_not raise_exception#(ArgumentError)
17
17
  end
18
18
 
19
19
  it 'should return a populated Application object' do
@@ -131,11 +131,11 @@ describe 'Excursion::Pool::Application' do
131
131
  subject { Excursion::Pool::Application.new 'test_app', {} }
132
132
 
133
133
  it 'should accept a Hash of named routes' do
134
- expect { subject.routes = {} }.to_not raise_exception(ArgumentError)
134
+ expect { subject.routes = {} }.to_not raise_exception#(ArgumentError)
135
135
  end
136
136
 
137
137
  it 'should accept a NamedRouteCollection' do
138
- expect { subject.routes = ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception(ArgumentError)
138
+ expect { subject.routes = ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception#(ArgumentError)
139
139
  end
140
140
 
141
141
  it 'should only accept a Hash or NamedRouteCollection' do
@@ -175,11 +175,11 @@ describe 'Excursion::Pool::Application' do
175
175
  end
176
176
 
177
177
  it 'should accept a Hash of named routes' do
178
- expect { subject.set_routes({}) }.to_not raise_exception(ArgumentError)
178
+ expect { subject.set_routes({}) }.to_not raise_exception#(ArgumentError)
179
179
  end
180
180
 
181
181
  it 'should accept a NamedRouteCollection' do
182
- expect { subject.set_routes ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception(ArgumentError)
182
+ expect { subject.set_routes ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception#(ArgumentError)
183
183
  end
184
184
 
185
185
  it 'should only accept a Hash or NamedRouteCollection' do
@@ -12,8 +12,8 @@ describe 'Excursion::Pool::DummyApplication' do
12
12
  end
13
13
 
14
14
  it 'should accept an optional route collection' do
15
- expect { Excursion::Pool::DummyApplication.new 'app_name', {} }.to_not raise_exception(ArgumentError)
16
- expect { Excursion::Pool::DummyApplication.new 'app_name', {}, {} }.to_not raise_exception(ArgumentError)
15
+ expect { Excursion::Pool::DummyApplication.new 'app_name', {} }.to_not raise_exception#(ArgumentError)
16
+ expect { Excursion::Pool::DummyApplication.new 'app_name', {}, {} }.to_not raise_exception#(ArgumentError)
17
17
  end
18
18
 
19
19
  it 'should return a populated DummyApplication object' do
@@ -136,11 +136,11 @@ describe 'Excursion::Pool::DummyApplication' do
136
136
  subject { Excursion::Pool::DummyApplication.new 'test_app', {} }
137
137
 
138
138
  it 'should accept a Hash of named routes' do
139
- expect { subject.routes = {} }.to_not raise_exception(ArgumentError)
139
+ expect { subject.routes = {} }.to_not raise_exception#(ArgumentError)
140
140
  end
141
141
 
142
142
  it 'should accept a NamedRouteCollection' do
143
- expect { subject.routes = ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception(ArgumentError)
143
+ expect { subject.routes = ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception#(ArgumentError)
144
144
  end
145
145
 
146
146
  it 'should only accept a Hash or NamedRouteCollection' do
@@ -180,11 +180,11 @@ describe 'Excursion::Pool::DummyApplication' do
180
180
  end
181
181
 
182
182
  it 'should accept a Hash of named routes' do
183
- expect { subject.set_routes({}) }.to_not raise_exception(ArgumentError)
183
+ expect { subject.set_routes({}) }.to_not raise_exception#(ArgumentError)
184
184
  end
185
185
 
186
186
  it 'should accept a NamedRouteCollection' do
187
- expect { subject.set_routes ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception(ArgumentError)
187
+ expect { subject.set_routes ActionDispatch::Routing::RouteSet::NamedRouteCollection.new }.to_not raise_exception#(ArgumentError)
188
188
  end
189
189
 
190
190
  it 'should only accept a Hash or NamedRouteCollection' do
@@ -20,17 +20,20 @@ describe 'Excursion::Pool' do
20
20
 
21
21
  it 'should support the :file datastore' do
22
22
  Excursion.configuration.datastore = :file
23
- expect { Excursion::Pool.datastore }.to_not raise_exception(Excursion::NoDatastoreError)
23
+ Excursion.configuration.datastore_file = 'tmp/.rout_pool'
24
+ expect { Excursion::Pool.datastore }.to_not raise_exception#(Excursion::NoDatastoreError)
24
25
  end
25
26
 
26
27
  it 'should support the :memcache datastore' do
27
28
  Excursion.configuration.datastore = :memcache
28
- expect { Excursion::Pool.datastore }.to_not raise_exception(Excursion::NoDatastoreError)
29
+ Excursion.configuration.memcache_server = 'localhost:11211'
30
+ expect { Excursion::Pool.datastore }.to_not raise_exception#(Excursion::NoDatastoreError)
29
31
  end
30
32
 
31
33
  context 'when using the :file datastore' do
32
34
  it 'should require the datastore_file option be configured' do
33
35
  Excursion.configuration.datastore = :file
36
+ Excursion.configuration.datastore_file = nil
34
37
  expect { Excursion::Pool.datastore }.to raise_exception(Excursion::DatastoreConfigurationError)
35
38
  end
36
39
 
@@ -44,6 +47,7 @@ describe 'Excursion::Pool' do
44
47
  context 'when using the :memcache datastore' do
45
48
  it 'should require the memcache_server option be configured' do
46
49
  Excursion.configuration.datastore = :memcache
50
+ Excursion.configuration.memcache_server = nil
47
51
  expect { Excursion::Pool.datastore }.to raise_exception(Excursion::MemcacheConfigurationError)
48
52
  end
49
53
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excursion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-17 00:00:00.000000000 Z
11
+ date: 2013-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -154,7 +154,8 @@ files:
154
154
  - spec/excursion/datastores/file_spec.rb
155
155
  - spec/spec_helper.rb
156
156
  homepage: http://github.com/markrebec/excursion
157
- licenses: []
157
+ licenses:
158
+ - MIT
158
159
  metadata: {}
159
160
  post_install_message:
160
161
  rdoc_options: []