Skip to content

Instantly share code, notes, and snippets.

@jeremyf
Created March 6, 2015 20:27
Show Gist options
  • Select an option

  • Save jeremyf/f48a31844c7c5d1cd47e to your computer and use it in GitHub Desktop.

Select an option

Save jeremyf/f48a31844c7c5d1cd47e to your computer and use it in GitHub Desktop.
require 'rails_helper'
describe 'MultiValueInput', type: :input do
class Foo
extend ActiveModel::Naming
include ActiveModel::Conversion
include ActiveModel::Validations
def persisted?; false; end
attr_accessor :bar
end
include RSpec::Rails::HelperExampleGroup
def input_for(object, attribute_name, options={})
helper.simple_form_for object, url: '' do |f|
f.input attribute_name, options
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment