Last active
August 29, 2015 14:08
-
-
Save varyonic/44211e1dcc089f694d94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "with inputs twice" do | |
let :body do | |
build_form do |f| | |
f.inputs do |f| | |
f.input :title | |
f.input :body | |
end | |
f.inputs do |f| | |
f.input :author | |
f.input :published_at | |
end | |
end | |
end | |
it "should render four inputs" do | |
expect(body.scan(/<input/).size).to eq(2) # utf8, title | |
expect(body.scan(/<textare/).size).to eq(1) # body | |
expect(body.scan(/<select/).size).to eq(6) # author, published at | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment