caulfield 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/caulfield.rb +4 -2
- data/lib/caulfield/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Caulfield is a small Rack middleware to be used in integration testing for Rails 3 applications. It offers a simple interface to inspect the session and cookie jar of the most recent request, and to set values and cookies for the next request. I'm using it with Capybara and RSpec, but I don't see why it wouldn't work with any other integration testing setup. It's a simple extraction from one of my projects, where I use it extensively, but it itself doesn't have tests, so beware.
|
4
4
|
|
5
|
-
|
5
|
+
If you're using Rails 3.0.0.beta4 or higher, Caulfield will insert itself into your middleware stack automatically. Otherwise, you'll have to specifically use Caulfield::Middleware.
|
6
6
|
|
7
7
|
### How to Use
|
8
8
|
|
data/lib/caulfield.rb
CHANGED
@@ -9,6 +9,8 @@ module Caulfield
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
if defined?(Rails) && Rails.version >= '3.0.0.beta4'
|
13
|
+
ActiveSupport.on_load :before_initialize do
|
14
|
+
Rails.configuration.middleware.use Caulfield::Middleware
|
15
|
+
end
|
14
16
|
end
|
data/lib/caulfield/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caulfield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Hanks
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-07-21 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|