sbfaulkner-sinatra-prawn 0.9.2 → 0.9.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/test/sinatra_prawn_test.rb +6 -6
- data/test/test_helper.rb +4 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/test/sinatra_prawn_test.rb
CHANGED
@@ -12,8 +12,8 @@ class SinatraPrawnTest < Test::Unit::TestCase
|
|
12
12
|
|
13
13
|
def test_renders_inline_strings
|
14
14
|
prawn_app { prawn 'pdf.text "Hello shrimp!"' }
|
15
|
-
assert ok?
|
16
|
-
text = PDF::TextInspector.analyze(body)
|
15
|
+
assert last_response.ok?
|
16
|
+
text = PDF::TextInspector.analyze(last_response.body)
|
17
17
|
assert_equal "Hello shrimp!", text.strings.first
|
18
18
|
end
|
19
19
|
|
@@ -24,8 +24,8 @@ class SinatraPrawnTest < Test::Unit::TestCase
|
|
24
24
|
pdf.text "Hello #{@name}!"
|
25
25
|
end
|
26
26
|
}
|
27
|
-
assert ok?
|
28
|
-
text = PDF::TextInspector.analyze(body)
|
27
|
+
assert last_response.ok?
|
28
|
+
text = PDF::TextInspector.analyze(last_response.body)
|
29
29
|
assert_equal "Hello Frank & Mary!", text.strings.first
|
30
30
|
end
|
31
31
|
|
@@ -34,8 +34,8 @@ class SinatraPrawnTest < Test::Unit::TestCase
|
|
34
34
|
@name = "World"
|
35
35
|
prawn :hello
|
36
36
|
}
|
37
|
-
assert ok?
|
38
|
-
text = PDF::TextInspector.analyze(body)
|
37
|
+
assert last_response.ok?
|
38
|
+
text = PDF::TextInspector.analyze(last_response.body)
|
39
39
|
assert_equal "Hello, World!", text.strings.first
|
40
40
|
end
|
41
41
|
|
data/test/test_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'test/unit'
|
3
|
-
require '
|
3
|
+
require 'rack/test'
|
4
4
|
|
5
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
6
6
|
require 'sinatra/prawn'
|
@@ -52,7 +52,9 @@ module PDF
|
|
52
52
|
end
|
53
53
|
|
54
54
|
class Test::Unit::TestCase
|
55
|
-
include
|
55
|
+
include Rack::Test::Methods
|
56
|
+
|
57
|
+
attr_reader :app
|
56
58
|
|
57
59
|
# Sets up a Sinatra::Base subclass defined with the block
|
58
60
|
# given. Used in setup or individual spec methods to establish
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbfaulkner-sinatra-prawn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.2
|
4
|
+
version: 0.9.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- S. Brent Faulkner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-29 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|