Sha256: 7acc5d0368b52a0333194e855ff2e883f725a326ff9389c7ea3b151be4f3be0e

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

# Fixtury

The goal of this library is to provide an interface for accessing fixture data on-demand rather than having to manage all resources up front. By centralizing and wrapping the definitions of data generation, we can preload and optimize how we load data, yet allow deferred behaviors when desired.

For example, if a developer is running a test locally, there's no reason to build all fixtures for your suite.

```
class MyTest < ::Test

  fixtury "users.fresh"
  let(:user) { fixtury("users.fresh") }

  def test_whatever
    assert_eq "Doug", user.first_name
  end

end

```

Loading this file would ensure `users.fresh` is loaded into the fixture set before the suite is run. In the context of ActiveSupport::TestCase, the Fixtury::Hooks file will ensure the database records are present prior to your suite running. Setting `use_transactional_fixtures` ensures all records are rolled back prior to running another test.

In a CI environment, we'd likely want to preload all fixtures. This can be done by requiring all the test files, then telling the fixtury store to load all definitions.

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fixtury-0.3.0 README.md
fixtury-0.3.0.beta README.md
fixtury-0.2.1 README.md
fixtury-0.2.0 README.md
fixtury-0.1.0 README.md
fixtury-0.1.0.rc1 README.md
fixtury-0.1.0.beta2 README.md
fixtury-0.1.0.beta README.md
fixtury-0.1.0.alpha2 README.md
fixtury-0.1.0.alpha README.md