Sha256: d176b64996f8fb64775784222ee2a6c7075219b1ed66ad7df734e871c59922ea

Contents?: true

Size: 786 Bytes

Versions: 31

Compression:

Stored size: 786 Bytes

Contents

module MiniTestSpecRails
  module SharedTestCaseBehavior

    extend ActiveSupport::Concern

    included do
      before           { setup_dummy_schema }
      let(:app)        { Dummy::Application }
      let(:user_ken)   { User.create! :email => 'ken@metaskills.net' }
      let(:user_post)  { Post.create! :title => 'Test Title', :body => 'Test body. Test body.', :user => user_ken}
    end

    private

    def setup_dummy_schema
      ActiveRecord::Base.class_eval do
        connection.instance_eval do
          create_table :users, :force => true do |t|
            t.string :email
          end
          create_table :posts, :force => true do |t|
            t.string  :title, :body
            t.integer :user_id
          end
        end
      end
    end
    
  end
end

Version data entries

31 entries across 31 versions & 3 rubygems

Version Path
minitest-spec-rails-4.7.11 test/support/shared_test_case_behavior.rb
minitest-spec-rails-4.7.10 test/support/shared_test_case_behavior.rb
minitest-spec-rails-4.7.9 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.2.2 test/support/shared_test_case_behavior.rb
minitest-spec-rails-4.7.8 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.2.0 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.1.1 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.1.0 test/support/shared_test_case_behavior.rb
minitest-spec-rails-orangejulius-5.0.5.pre.orangejulius test/support/shared_test_case_behavior.rb
minitest-spec-rails-orangejulius-5.0.4.pre.orangejulius test/support/shared_test_case_behavior.rb
minitest-spec-rails-4.7.7 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.0.4 test/support/shared_test_case_behavior.rb
minitest-spec-rails-orangejulius-5.0.3.pre.orangejulius test/support/shared_test_case_behavior.rb
self_systeem-0.0.5 test/support/shared_test_case_behavior.rb
self_systeem-0.0.4 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.0.3 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.0.2 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.0.1 test/support/shared_test_case_behavior.rb
minitest-spec-rails-4.7.6 test/support/shared_test_case_behavior.rb
minitest-spec-rails-5.0.0 test/support/shared_test_case_behavior.rb