test/test_attributes.rb in attrtastic-0.2.1 vs test/test_attributes.rb in attrtastic-0.2.2
- old
+ new
@@ -149,11 +149,11 @@
assert_equal expected, actual
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes user">
<ol>
</ol>
</div>
EOHTML
@@ -164,11 +164,11 @@
should "show header" do
@blog_builder.attributes "Author", :for => :author do |author|
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes user">
<div class="legend">Author</div>
<ol>
</ol>
</div>
EOHTML
@@ -177,11 +177,11 @@
assert_equal expected, actual
end
should "work with field list" do
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes user">
<ol>
<li class="attribute">
<span class="label">Full name</span>
<span class="value">Doe, John</span>
</li>
@@ -220,11 +220,11 @@
assert_equal expected, actual
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes user">
<ol>
</ol>
</div>
EOHTML
@@ -235,11 +235,11 @@
should "show header" do
@blog_builder.attributes "Author", :for => @user do |author|
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes user">
<div class="legend">Author</div>
<ol>
</ol>
</div>
EOHTML
@@ -248,11 +248,11 @@
assert_equal expected, actual
end
should "work with field list" do
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes user">
<ol>
<li class="attribute">
<span class="label">Full name</span>
<span class="value">Doe, John</span>
</li>
@@ -284,15 +284,15 @@
should "generate output for given objects" do
@blog_builder.attributes :for => :posts do |post|
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes post">
<ol>
</ol>
</div>
- <div class="attributes">
+ <div class="attributes post">
<ol>
</ol>
</div>
EOHTML
@@ -303,16 +303,16 @@
should "show header" do
@blog_builder.attributes "Post", :for => :posts do |post|
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes post">
<div class="legend">Post</div>
<ol>
</ol>
</div>
- <div class="attributes">
+ <div class="attributes post">
<div class="legend">Post</div>
<ol>
</ol>
</div>
EOHTML
@@ -321,19 +321,19 @@
assert_equal expected, actual
end
should "work with field list" do
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes post">
<ol>
<li class="attribute">
<span class="label">Title</span>
<span class="value">Hello World!</span>
</li>
</ol>
</div>
- <div class="attributes">
+ <div class="attributes post">
<ol>
<li class="attribute">
<span class="label">Title</span>
<span class="value">Sorry</span>
</li>
@@ -365,15 +365,15 @@
should "generate output for given objects" do
@blog_builder.attributes :for => @blog.posts do |post|
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes post">
<ol>
</ol>
</div>
- <div class="attributes">
+ <div class="attributes post">
<ol>
</ol>
</div>
EOHTML
@@ -384,16 +384,16 @@
should "show header" do
@blog_builder.attributes "Post", :for => @blog.posts do |post|
end
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes post">
<div class="legend">Post</div>
<ol>
</ol>
</div>
- <div class="attributes">
+ <div class="attributes post">
<div class="legend">Post</div>
<ol>
</ol>
</div>
EOHTML
@@ -402,18 +402,18 @@
assert_equal expected, actual
end
should "work with field list" do
expected = html <<-EOHTML
- <div class="attributes">
+ <div class="attributes post">
<ol>
<li class="attribute">
<span class="label">Title</span>
<span class="value">Hello World!</span>
</li>
</ol>
</div>
- <div class="attributes">
+ <div class="attributes post">
<ol>
<li class="attribute">
<span class="label">Title</span>
<span class="value">Sorry</span>
</li>