Skip to content

Commit 97293a7

Browse files
committed
remove redundant set of tests
This code almost exactly mirrors the tests abve it. The only difference being that this uses `button_html` while the other uses `label` when dealing with `f.action`. We shouldn't be testing Formtastic's public API, so I'm removing the second set of tests.
1 parent 3f58ea9 commit 97293a7

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

spec/unit/form_builder_spec.rb

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -69,38 +69,6 @@ def build_form(options = {}, form_object = Post.new, &block)
6969
end
7070
end
7171

72-
context "in general with actions" do
73-
let :body do
74-
build_form do |f|
75-
f.inputs do
76-
f.input :title
77-
f.input :body
78-
end
79-
f.actions do
80-
f.action :submit, :button_html => { :value => "Submit Me" }
81-
f.action :submit, :button_html => { :value => "Another Button" }
82-
end
83-
end
84-
end
85-
86-
it "should generate a text input" do
87-
body.should have_tag("input", :attributes => { :type => "text",
88-
:name => "post[title]" })
89-
end
90-
it "should generate a textarea" do
91-
body.should have_tag("textarea", :attributes => { :name => "post[body]" })
92-
end
93-
it "should only generate the form once" do
94-
body.scan(/Title/).size.should == 1
95-
end
96-
it "should generate actions" do
97-
body.should have_tag("input", :attributes => { :type => "submit",
98-
:value => "Submit Me" })
99-
body.should have_tag("input", :attributes => { :type => "submit",
100-
:value => "Another Button" })
101-
end
102-
end
103-
10472
context "when polymorphic relationship" do
10573
it "should raise error" do
10674
lambda {

0 commit comments

Comments
 (0)