Sha256: 61509c6164222d630fb30bb9c6f011cae504999acad93b4e4d0460c4c8e465ad

Contents?: true

Size: 869 Bytes

Versions: 2

Compression:

Stored size: 869 Bytes

Contents

# JamJar

JamJar dynamically creates ActiveRecord models, backed by in-memory SQLite, to help you test your ActiveRecord extensions.

## Installation

Add this line to your application's Gemfile:

```ruby
gem "jamjar"
```

And then execute:

    $ bundle

## Usage

To generate a new model, simply call:

```ruby
JamJar.model
```

You can pass a block, which will be evaluated in the model's class context:

```ruby
model = JamJar.model do
  def self.foo
    "bar"
  end
end

model.foo #=> "bar"
```

You can add columns to your model's table with `column`.

```ruby
JamJar.model do
  column :foo, :string
end
```

## Contributing

1. Fork it
2. Create a branch (`git checkout -b super-foo`)
3. Add your feature and specs.
4. Commit your changes (`git commit -am 'Extra-super foo-matic.'`)
5. Push to the branch (`git push origin super-foo`)
6. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jamjar-1.1.0 README.md
jamjar-1.0.0 README.md