sbfaulkner-sinatra-markaby 0.9.2 → 0.9.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,8 +13,8 @@ class SinatraMarkabyTest < Test::Unit::TestCase
13
13
 
14
14
  def test_renders_inline_strings
15
15
  markaby_app { markaby 'mab.p "Hello shrimp!"' }
16
- assert ok?
17
- assert_equal "<p>Hello shrimp!</p>", body
16
+ assert last_response.ok?
17
+ assert_equal "<p>Hello shrimp!</p>", last_response.body
18
18
  end
19
19
 
20
20
  def test_renders_inline_blocks
@@ -24,8 +24,8 @@ class SinatraMarkabyTest < Test::Unit::TestCase
24
24
  mab.p "Hello #{@name}!"
25
25
  end
26
26
  }
27
- assert ok?
28
- assert_equal "<p>Hello Frank &amp; Mary!</p>", body
27
+ assert last_response.ok?
28
+ assert_equal "<p>Hello Frank &amp; Mary!</p>", last_response.body
29
29
  end
30
30
 
31
31
  def test_renders_markaby_files_in_views_path
@@ -33,8 +33,8 @@ class SinatraMarkabyTest < Test::Unit::TestCase
33
33
  @name = "World"
34
34
  markaby :hello
35
35
  }
36
- assert ok?
37
- assert_equal "<p>Hello, World!</p>", body
36
+ assert last_response.ok?
37
+ assert_equal "<p>Hello, World!</p>", last_response.body
38
38
  end
39
39
 
40
40
  def test_renders_in_file_template
@@ -42,8 +42,8 @@ class SinatraMarkabyTest < Test::Unit::TestCase
42
42
  @name = "Joe"
43
43
  markaby :in_file
44
44
  }
45
- assert ok?
46
- assert_equal "<p>Hey Joe</p>", body
45
+ assert last_response.ok?
46
+ assert_equal "<p>Hey Joe</p>", last_response.body
47
47
  end
48
48
 
49
49
  def test_raises_error_if_template_not_found
data/test/test_helper.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  require 'rubygems'
2
2
  require 'test/unit'
3
- require 'sinatra/test'
3
+ require 'rack/test'
4
4
 
5
5
  $LOAD_PATH.unshift(File.dirname(__FILE__))
6
6
  require 'sinatra/markaby'
7
7
 
8
8
  class Test::Unit::TestCase
9
- include Sinatra::Test
9
+ include Rack::Test::Methods
10
+
11
+ attr_reader :app
10
12
 
11
13
  # Sets up a Sinatra::Base subclass defined with the block
12
14
  # 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-markaby
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