Skip to content

Commit

Permalink
Fix specs for Rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Apr 26, 2015
1 parent 0dfb120 commit 106a094
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/localized_fields_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
require 'spec_helper'

describe 'LocalizedFields' do
let(:rails3?) { ActionView::VERSION::MAJOR == 3 }
let(:post) { Post.new }
let(:template) { ActionView::Base.new }
let(:builder) { ActionView::Helpers::FormBuilder.new(:post, post, template, {}) }
let(:rails3?) { ActionView::VERSION::MAJOR == 3 }
let(:builder) { ActionView::Helpers::FormBuilder.new(*builder_args) }
let(:builder_args) do
args = [:post, post, template, {}]
args += [proc {}] if rails3?
args
end

before do
template.output_buffer = ''
Expand Down

0 comments on commit 106a094

Please sign in to comment.