Skip to content

Commit

Permalink
OMG fix the broken build!!
Browse files Browse the repository at this point in the history
  • Loading branch information
fredwu committed Jul 17, 2012
1 parent cc27de3 commit 9a96797
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/api_taster/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ class FormBuilder < AbstractController::Base

def initialize(params)
flush_output_buffer
@_buffer = '<legend class="hero-legend"></legend>'
@_buffer = ''
add_to_buffer(params)
end

def html
@_buffer
"<legend class=\"hero-legend\"></legend>#{@_buffer}"
end

private
Expand Down
4 changes: 0 additions & 4 deletions spec/dummy/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
end

ApiTaster.routes do
ApiTaster.global_params = {
:version => 1
}

get '/i_dont_exist_anymore', {
:hello => 'world'
}
Expand Down
6 changes: 3 additions & 3 deletions spec/form_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ module ApiTaster
end

it "does arrays" do
builder.html.should match(/name="\[user\]\[comment\]\[title\]\[\]" value="1"/)
builder.html.should match(/name="user\[comment\]\[title\]\[\]" value="1"/)
end

it "does nested arrays" do
builder.html.should match(/name="\[items\]\[\]\[nested_items\]\[\]\[nested_numbers\]\[\]" value="5"/)
builder.html.should match(/name="\[items\]\[\]\[nested_items\]\[\]\[name\]" value="apple"/)
builder.html.should match(/name="items\[\]\[nested_items\]\[\]\[nested_numbers\]\[\]" value="5"/)
builder.html.should match(/name="items\[\]\[nested_items\]\[\]\[name\]" value="apple"/)
end
end
end
Expand Down

0 comments on commit 9a96797

Please sign in to comment.