Top "Fixtures" questions

Fixtures are scopes used for running tests which isolate each test from global namespace pollution and side-effects from previous tests in order to avoid false positives and false negatives

difference between fixture and yield_fixture in pytest

I am going through pytest fixtures, and the following looks pretty similar, latest works pretty similar. Yes, the readability is …

python python-2.7 pytest fixtures
In a Rails unit test, how can I get a User fixture to load its associated Profile?

In the documentation concerning Fixtures (http://api.rubyonrails.org/classes/Fixtures.html) they provide the following example of using label …

ruby-on-rails unit-testing fixtures
Functional testing with Rails and Devise. What to put in my fixtures?

Hi I'm wanting to do some functional testing of my Rails 3 app that uses Devise and CanCan. In my User …

ruby-on-rails devise functional-testing fixtures
Rails Dates Time and Fixtures

I had the following fixture: link_1: user: tom image: boy1 created_at: <%= 5.day.ago %> I tried the following …

ruby-on-rails activerecord fixtures
Rails 3 test fixtures with carrierwave?

I'm working on upgrading from attachment_fu to carrierwave, since attachment_fu is broken in rails 3. None of the tests …

ruby-on-rails ruby-on-rails-3 unit-testing fixtures carrierwave
Unit testing: Is it a good practice to have assertions in setup methods?

In unit testing, the setup method is used to create the objects needed for testing. In those setup methods, I …

unit-testing refactoring fixtures assertions
How do I prevent fixtures from conflicting with django post_save signal code?

In my application, I want to create entries in certain tables when a new user signs up. For instance, I …

python django signals fixtures django-signals
Rails - Testing fixtures error NoMethodError: undefined method `type' for nil:NilClass

I have a problem running tests that use fixtures with associations between models. Here's the error I get, as soon …

ruby-on-rails ruby tdd associations fixtures
Selenium: How do I use javascript to clear a value from a form field?

I'm using the selenium IDE and the Selenium-Fitnesse Bridge fixture and I'm trying to test that when I clear a …

selenium fixtures fitnesse selenium-fitnesse-bridge
Rails fixtures -- how do you set foreign keys?

I'm reading about Rails fixtures in this guide (thanks, trevorturk). It appears you define classes in a Yaml file and …

ruby-on-rails unit-testing testing tdd fixtures