On Oct 29, 2010, at 2:41 PM, Mack T. wrote:
> By "fixtures outside Rspec", I was referring to files in our db/fixtures
> directory, which I assumed were fixtures. On further investigation, I
> found these files are actually being used by some custom 'seeding' code
> a coworker of mine wrote.
By "fixtures outside Rspec", I was referring to files in our db/fixtures
directory, which I assumed were fixtures. On further investigation, I
found these files are actually being used by some custom 'seeding' code
a coworker of mine wrote. The seeding is reading the fixtures and
creating AR
On Oct 28, 2010, at 3:25 PM, Mack T. wrote:
> Figured this out. Our fixtures outside Rspec are actually being used to
> create instances of ActiveRecord models. AR supports
> accepts_nested_attributes_for, but the Rspec fixtures bypass AR and
> simply attempt to set database values.
There are n
Figured this out. Our fixtures outside Rspec are actually being used to
create instances of ActiveRecord models. AR supports
accepts_nested_attributes_for, but the Rspec fixtures bypass AR and
simply attempt to set database values.
--
Posted via http://www.ruby-forum.com/.
_
On Wed, Oct 27, 2010 at 6:30 PM, Mack T. wrote:
> I appreciate the quick response! Sorry for the delay. The relevant
> code is attached. Our model's name is Scale, which has_many
> ScaleElements.
>
> We're loading fixtures in specs with config.fixture_path =
> "#{::Rails.root}/spec/fixtures"
>
I appreciate the quick response! Sorry for the delay. The relevant
code is attached. Our model's name is Scale, which has_many
ScaleElements.
We're loading fixtures in specs with config.fixture_path =
"#{::Rails.root}/spec/fixtures"
Nested attributes don't work (although they do outside of
On Mon, Oct 11, 2010 at 12:05 PM, Mack wrote:
> I'm unable to get nested attributes in fixtures to work with Rspec.
> The models and fixtures function fine outside of rspec, but I get a
> mysql error (Unknown column "_attributes) when running
> tests with the same fixtures.
>
> I am able to get th
I'm unable to get nested attributes in fixtures to work with Rspec.
The models and fixtures function fine outside of rspec, but I get a
mysql error (Unknown column "_attributes) when running
tests with the same fixtures.
I am able to get the specs to run by creating a separate fixture for
the nest