Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10837 (new defect)

Opened 9 months ago

Last modified 9 months ago

Rspec should be_valid breaking on revision 8570

Reported by: railsjitsu Assigned to: core
Priority: high Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords:
Cc:

Description

I am tracking the exact change now, but it is a big changeset. Lots of switches from Test::Unit::TestCase to ActiveSupport::TestCase

Change History

01/17/08 09:16:26 changed by railsjitsu

The problem more specifically seems to be the test database not being torn down in between tests, but there is also something more. Tracking it down.

01/17/08 09:19:42 changed by railsjitsu

output for my particular test in 8569: /opt/local/bin/ruby -S script/spec -O spec/spec.opts spec/models/user_spec.rb

19 examples, 0 failures

output for my particular test in 8570: /opt/local/bin/ruby -S script/spec -O spec/spec.opts spec/models/user_spec.rb

1) 'User should be valid when created using valid attributes' FAILED expected valid? to return true, got false /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/expectations.rb:52:in `fail_with' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/expectations/handler.rb:21:in `handle_matcher' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb:34:in `should' ./spec/models/user_spec.rb:12: /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_methods.rb:79:in `instance_eval' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_methods.rb:79:in `run_with_description_capturing' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/matchers.rb:144:in `capture_generated_description' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_methods.rb:78:in `run_with_description_capturing' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_methods.rb:19:in `execute' /opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_methods.rb:16:in `execute' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:286:in `execute_examples' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:285:in `each' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:285:in `execute_examples' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:120:in `run' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:22:in `run' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:21:in `each' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:21:in `run' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/runner/options.rb:87:in `run_examples' /Users/ejamesokelly/Development/FanVsFan/fanvsfan/vendor/plugins/rspec/lib/spec/runner/command_line.rb:19:in `run' script/spec:4:

Finished in 0.168437 seconds

19 examples, 1 failure

01/17/08 09:38:45 changed by railsjitsu

It is definately a problem with: activerecord/lib/active_record/fixtures.rb 8570

If I roll back this one file to 8569 everything works fine again. I did notice that there was a large block :teardown_without_fixtures that was removed and no replacement seems to be made.

Digging deeper.