Registry / testing / with-model

with-model

JSON →
library2.2.0rbrubygemsunverified

Dynamically build a model within an RSpec context for testing.

gem install with_model
INSTALL
IMPORT
SIG · WITH-MODEL
W
with-model
testingrubyv2.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WithModel
require 'with_model'

Define a temporary ActiveRecord model within an RSpec example.

require 'with_model' RSpec.describe 'MyModel' do with_model :MyModel do table do |t| t.string :name end end it 'creates a dynamic model' do expect(MyModel.new).to respond_to(:name) end end
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.2.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
with-model — gem install with-model · libregistry