mail_style 0.1.2 → 0.1.3

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.
@@ -66,8 +66,7 @@ module MailStyle
66
66
  element['style'] = style.join(';')
67
67
  end
68
68
 
69
- # Strip all references to classes.
70
- html_document.css('*').remove_class
69
+ # Return HTML
71
70
  html_document.to_html
72
71
  end
73
72
 
@@ -127,12 +127,8 @@ describe 'Inline styles' do
127
127
  @html.should match(/<body style="background: #000">/)
128
128
  end
129
129
 
130
- it "should remove classes from html" do
131
- @html.should_not match(/<p.*class="text".*>/)
132
- end
133
-
134
130
  it "should add both styles to paragraph" do
135
- @html.should match(/<p style="color: #0f0;font-size: 14px;line-height: 1.5">/)
131
+ @html.should match(/<p class="text" style="color: #0f0;font-size: 14px;line-height: 1.5">/)
136
132
  end
137
133
  end
138
134
 
@@ -144,8 +140,9 @@ describe 'Inline styles' do
144
140
  EOF
145
141
  @email = TestMailer.deliver_test_multipart(:real)
146
142
  @html = html_part(@email)
147
- @html.should match(/<p style="color: #0f0">/)
143
+ @html.should match(/<p class="text" style="color: #0f0">/)
148
144
  end
145
+
149
146
  it "should combine different properties for one element" do
150
147
  css_rules <<-EOF
151
148
  .text { font-size: 14px; }
@@ -153,7 +150,7 @@ describe 'Inline styles' do
153
150
  EOF
154
151
  @email = TestMailer.deliver_test_multipart(:real)
155
152
  @html = html_part(@email)
156
- @html.should match(/<p style="color: #f00;font-size: 14px">/)
153
+ @html.should match(/<p class="text" style="color: #f00;font-size: 14px">/)
157
154
  end
158
155
  end
159
156
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Neath
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-06 00:00:00 +00:00
12
+ date: 2010-01-29 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency