Added minitest support. Otherwise it's not possible to use mini test with factory girl fixtures. Maybe this gem should not touch the test framwork setups at all?
Change rails dependancy to greater than 3.0.7
factory_girl_rails <3 minitest spec
Allow both test_unit and mini_test as well as rspec
Merge remote-tracking branch 'remotes/ryanatwork/master' into umuro
Thank you! Just got crazy over this problem. Using your fork for now :)
Can we get this (or something like it) accepted? I've had two questions about this in the past day.
more general... don't set test framework, just fixture replacement
Here is my fix: jonesdeini@fe632cf
It's very general and works with test_unit or mini_test.
+1 for @jonesdeini's fix.
Minitest and all frameworks supported. Because you configure them nor…
…mally. They are not touched here. +1 for @joedesini
I've merged @jonesdeini's fix.
MiniTesting with FactoryGirl now. Just having normal configuration in my application.rb
config.generators do |g|
g.test_framework :mini_test, :spec => true, :fixture=>false, :fixture_replacement=>:factory_girl
You don't need to add this to your configuration to your config/application.rb file because the factory_girl_rails gem in your Gemfile will do this for you, right?
This breaks features/fixture_replacement_config.feature:18 because it no longer generates the factory file correctly.
The reason I know the test is failing is because I tried to merge this, because we want this feature.
It's worth noting that this branch did not merge cleanly. Perhaps if you rebase against master you will do a better job resolving conflicts than I.
This is the failure I see. I do not see it in master, only in this branch:
~/thoughtbot/factory_girl_rails% ruby -v
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]
/home/mike/.rvm/rubies/ruby-1.9.2-p320/bin/ruby -S bundle exec cucumber --format progress
(::) failed steps (::)
expected file?("test/factories/users.rb") to return true, got false (RSpec::Expectations::ExpectationNotMetError)
features/fixture_replacement_config.feature:18:in `Then the following files should exist:'
cucumber features/fixture_replacement_config.feature:14 # Scenario: Using Factory Girl and Factory Girl Rails with Test Unit generates
a factory file and does not generate a fixture file
5 scenarios (1 failed, 4 passed)
49 steps (1 failed, 1 skipped, 47 passed)
Command failed with status (1): [/home/mike/.rvm/rubies/ruby-1.9.2-p320/bin...]
Tasks: TOP => default => cucumber
(See full trace by running task with --trace)
Initial support for MiniTest
Closes #68, #75