Sha256: 8479e2d3b2811544d270e128f4890f239073ef63b634b30a7db5ca6bf000ed2a
Contents?: true
Size: 830 Bytes
Versions: 4
Compression:
Stored size: 830 Bytes
Contents
# encoding: utf-8 require 'spec_helper' RSpec.describe 'Formtastic::Helpers::Reflection' do include FormtasticSpecHelper before do @output_buffer = '' mock_everything end class ReflectionTester include Formtastic::Helpers::Reflection def initialize(model_object) @object = model_object end end context 'with an ActiveRecord object' do it "should return association details on an ActiveRecord association" do @reflection_tester = ReflectionTester.new(@new_post) expect(@reflection_tester.reflection_for(:sub_posts)).not_to be_nil end it "should return association details on a MongoMapper association" do @reflection_tester = ReflectionTester.new(@new_mm_post) expect(@reflection_tester.reflection_for(:sub_posts)).not_to be_nil end end end
Version data entries
4 entries across 4 versions & 2 rubygems