sbfaulkner-sinatra-markaby 0.9.2.1 → 0.9.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 9
4
- :patch: 2
4
+ :patch: 2.2
@@ -14,36 +14,45 @@ class SinatraMarkabyTest < Test::Unit::TestCase
14
14
  def test_renders_inline_strings
15
15
  markaby_app { markaby 'mab.p "Hello shrimp!"' }
16
16
  assert last_response.ok?
17
- assert_equal "<p>Hello shrimp!</p>", last_response.body
17
+ assert_equal '<p>Hello shrimp!</p>', last_response.body
18
18
  end
19
19
 
20
20
  def test_renders_inline_blocks
21
21
  markaby_app {
22
- @name = "Frank & Mary"
22
+ @name = 'Frank & Mary'
23
23
  markaby do |mab|
24
24
  mab.p "Hello #{@name}!"
25
25
  end
26
26
  }
27
27
  assert last_response.ok?
28
- assert_equal "<p>Hello Frank &amp; Mary!</p>", last_response.body
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
32
32
  markaby_app {
33
- @name = "World"
33
+ @name = 'World'
34
34
  markaby :hello
35
35
  }
36
36
  assert last_response.ok?
37
- assert_equal "<p>Hello, World!</p>", last_response.body
37
+ assert_equal '<p>Hello, World!</p>', last_response.body
38
38
  end
39
39
 
40
40
  def test_renders_in_file_template
41
41
  markaby_app {
42
- @name = "Joe"
42
+ @name = 'Joe'
43
43
  markaby :in_file
44
44
  }
45
45
  assert last_response.ok?
46
- assert_equal "<p>Hey Joe</p>", last_response.body
46
+ assert_equal '<p>Hey Joe</p>', last_response.body
47
+ end
48
+
49
+ def test_renders_with_layout
50
+ markaby_app {
51
+ @name = 'with Layout'
52
+ markaby :hello, :layout => :html
53
+ }
54
+ assert last_response.ok?
55
+ assert_equal '<html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Hello</title></head><body><p>Hello, with Layout!</p></body></html>', last_response.body
47
56
  end
48
57
 
49
58
  def test_raises_error_if_template_not_found
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.1
4
+ version: 0.9.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - S. Brent Faulkner