[rspec-users] rspec-rails-2.4.0 is released!
Jim Morris
wolfmanjm at gmail.com
Mon Jan 3 02:06:26 EST 2011
Good job ;)
I was looking around to see where stuff was required, figured it may
have something to do with the fact I don't use
require 'rails/all'
in my application.rb, but break out stuff so I don't include
activerecord but do include sequel, maybe active record which is
usually loaded first pulls something in that you needed?
Thanks
On Jan 2, 10:15 pm, David Chelimsky <dchelim... at gmail.com> wrote:
> On Sun, Jan 2, 2011 at 11:51 PM, David Chelimsky <dchelim... at gmail.com> wrote:
> > On Sun, Jan 2, 2011 at 11:01 PM, Jim Morris <wolfma... at gmail.com> wrote:
> >> Ok I re installed rspec-rails 2.4.0 looks like my request specs run,
> >> and my model specs run but my
> >> controller specs and helper specs do not run, and throw that error.
>
> >> I have that config.around.. in my spec_helper which applies to most
> >> request specs but not to the helper specs or controller specs (which
> >> use mocks), so that is a difference, the around does NOT run when the
> >> helpers or controller specs run, but I don't see how that would cause
> >> this error.
>
> >> I removed the rspec-cells gem but that did not do anything to help.
>
> >> So if you were to checkout my project and change the Gemfile to get
> >> rspec 2.4.0 then run...
>
> >> rspec spec/controllers/posts_controller_spec.rb
>
> >> you should get this dump...
>
> > The around hook is a red herring too.
>
> > This is very odd. I'm not sure what it is yet, but it's something to
> > do with the load order of modules. I can't reproduce this in my apps,
> > but I can in yours with no problem.
>
> > Onward ...
>
> Found it. Will release a bug fix release of rspec-rails shortly.
>
> I don't understand why I hadn't seen it in any of my apps, or in
> rspec's own spec suite, but it boils down to the order in which
> RSpec::Rails::RailsExampleGroup and
> ActionController::TestCase::Behavior are declared.
>
>
>
> >> [sequel] Setting up the "test" environment:
> >> /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> actionpack-3.0.3/lib/action_controller/test_case.rb:10: undefined
> >> method `setup' for #<Class:0xa1bda8c> (NoMethodError)
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:52:in `class_eval'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:52:in
> >> `append_features'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> actionpack-3.0.3/lib/action_controller/test_case.rb:439:in `include'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> actionpack-3.0.3/lib/action_controller/test_case.rb:439
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:52:in `class_eval'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:52:in
> >> `append_features'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:48:in `include'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:48:in `send'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:48:in
> >> `append_features'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:48:in `each'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> activesupport-3.0.3/lib/active_support/concern.rb:48:in
> >> `append_features'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:372:in `include'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:372:in `send'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:372:in
> >> `configure_group'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:369:in `each'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:369:in
> >> `configure_group'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/world.rb:35:in `configure_group'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/example_group.rb:153:in `set_it_up'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/example_group.rb:130:in `subclass'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/example_group.rb:118:in `describe'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/extensions/object.rb:6:in `describe'
> >> from /home/morris/work/ruby/rails3/wolfmanblog/spec/
> >> controllers/posts_controller_spec.rb:3
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in `load'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in
> >> `load_spec_files'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in `map'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in
> >> `load_spec_files'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/command_line.rb:18:in `run'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/runner.rb:55:in `run_in_process'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/runner.rb:46:in `run'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
> >> rspec-core-2.4.0/lib/rspec/core/runner.rb:10:in `autorun'
> >> from /opt/ruby-enterprise-1.8.7-2010.02/bin/rspec:19
>
> >> On Jan 2, 8:12 pm, Jim Morris <wolfma... at gmail.com> wrote:
> >>> Yes I can, the full app is onhttps://github.com/wolfmanjm/wolfmanblog_rails
> >>> although I downgraded back to rspec-rails 2.3.1, before I did that my
> >>> Gemfile.lock looked like...
>
> >>> GEM
> >>> remote:http://rubygems.org/
> >>> specs:
> >>> abstract (1.0.0)
> >>> actionmailer (3.0.3)
> >>> actionpack (= 3.0.3)
> >>> mail (~> 2.2.9)
> >>> actionpack (3.0.3)
> >>> activemodel (= 3.0.3)
> >>> activesupport (= 3.0.3)
> >>> builder (~> 2.1.2)
> >>> erubis (~> 2.6.6)
> >>> i18n (~> 0.4)
> >>> rack (~> 1.2.1)
> >>> rack-mount (~> 0.6.13)
> >>> rack-test (~> 0.5.6)
> >>> tzinfo (~> 0.3.23)
> >>> activemodel (3.0.3)
> >>> activesupport (= 3.0.3)
> >>> builder (~> 2.1.2)
> >>> i18n (~> 0.4)
> >>> activerecord (3.0.3)
> >>> activemodel (= 3.0.3)
> >>> activesupport (= 3.0.3)
> >>> arel (~> 2.0.2)
> >>> tzinfo (~> 0.3.23)
> >>> activeresource (3.0.3)
> >>> activemodel (= 3.0.3)
> >>> activesupport (= 3.0.3)
> >>> activesupport (3.0.3)
> >>> arel (2.0.6)
> >>> builder (2.1.2)
> >>> cells (3.4.2)
> >>> diff-lcs (1.1.2)
> >>> erubis (2.6.6)
> >>> abstract (>= 1.0.0)
> >>> factory_girl (1.3.2)
> >>> factory_girl_rails (1.0)
> >>> factory_girl (~> 1.3)
> >>> rails (>= 3.0.0.beta4)
> >>> haml (3.0.24)
> >>> i18n (0.5.0)
> >>> mail (2.2.12)
> >>> activesupport (>= 2.3.6)
> >>> i18n (>= 0.4.0)
> >>> mime-types (~> 1.16)
> >>> treetop (~> 1.4.8)
> >>> mime-types (1.16)
> >>> nokogiri (1.4.4)
> >>> pg (0.10.0)
> >>> polyglot (0.3.1)
> >>> rack (1.2.1)
> >>> rack-mount (0.6.13)
> >>> rack (>= 1.0.0)
> >>> rack-test (0.5.7)
> >>> rack (>= 1.0)
> >>> rails (3.0.3)
> >>> actionmailer (= 3.0.3)
> >>> actionpack (= 3.0.3)
> >>> activerecord (= 3.0.3)
> >>> activeresource (= 3.0.3)
> >>> activesupport (= 3.0.3)
> >>> bundler (~> 1.0)
> >>> railties (= 3.0.3)
> >>> railties (3.0.3)
> >>> actionpack (= 3.0.3)
> >>> activesupport (= 3.0.3)
> >>> rake (>= 0.8.7)
> >>> thor (~> 0.14.4)
> >>> rake (0.8.7)
> >>> rdiscount (1.6.5)
> >>> rspec (2.4.0)
> >>> rspec-core (~> 2.4.0)
> >>> rspec-expectations (~> 2.4.0)
> >>> rspec-mocks (~> 2.4.0)
> >>> rspec-cells (0.0.2)
> >>> cells (~> 3.4)
> >>> rails (~> 3.0)
> >>> rspec-rails (~> 2.2)
> >>> rspec-core (2.4.0)
> >>> rspec-expectations (2.4.0)
> >>> diff-lcs (~> 1.1.2)
> >>> rspec-mocks (2.4.0)
> >>> rspec-rails (2.4.0)
> >>> actionpack (~> 3.0)
> >>> activesupport (~> 3.0)
> >>> railties (~> 3.0)
> >>> rspec (~> 2.4.0)
> >>> sequel (3.17.0)
> >>> sequel-rails (0.1.8)
> >>> actionpack (~> 3.0.0)
> >>> activesupport (~> 3.0.0)
> >>> railties (~> 3.0.0)
> >>> sequel (~> 3.13)
> >>> stringex (1.2.0)
> >>> thor (0.14.6)
> >>> treetop (1.4.9)
> >>> polyglot (>= 0.3.1)
> >>> tzinfo (0.3.23)
> >>> uuidtools (2.1.1)
> >>> webrat (0.7.2)
> >>> nokogiri (>= 1.2.0)
> >>> rack (>= 1.0)
> >>> rack-test (>= 0.5.3)
>
> >>> PLATFORMS
> >>> ruby
>
> >>> DEPENDENCIES
> >>> cells
> >>> factory_girl_rails
> >>> haml
> >>> pg
> >>> rails (= 3.0.3)
> >>> rdiscount
> >>> rspec-cells
> >>> rspec-rails (~> 2.3)
> >>> sequel-rails
> >>> stringex
> >>> uuidtools
> >>> webrat
>
> >>> Using rake (0.8.7)
> >>> Using abstract (1.0.0)
> >>> Using activesupport (3.0.3)
> >>> Using builder (2.1.2)
> >>> Using i18n (0.5.0)
> >>> Using activemodel
>
> ...
>
> read more »
More information about the rspec-users
mailing list