Sha256: 5f2779cfbd1e2f649813dcd48fedaee4ecce4369cddf037b55fc2ac166d903eb
Contents?: true
Size: 772 Bytes
Versions: 7
Compression:
Stored size: 772 Bytes
Contents
require 'active_element' require_relative 'dummy/config/environment' RSpec::Documentation.configure do |config| ActiveRecord::Migration.class_eval do drop_table :users rescue ActiveRecord::StatementInvalid # Skip end ActiveRecord::Migration.class_eval do create_table :users do |t| t.string :name t.string :email t.text :overview end end config.context do |context| class StubbedController < ActiveElement::ApplicationController def initialize(*args, &block) append_view_path File.expand_path(File.join(__dir__, '../app/views/')) super end def params {} end end context.active_element.component = ActiveElement::Component.new(StubbedController.new) end end
Version data entries
7 entries across 7 versions & 1 rubygems