Forum: RSpec Problems upgrading to Rails-2.3.2/Rspec 1.2.6

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
54568ee7ba0c78a836e84c8756a3d681?d=identicon&s=25 Lenny Marks (Guest)
on 2009-06-06 00:47
(Received via mailing list)
jruby-1.3.0
rspec/rspec-rails 1.2.6

I just ran into the 'Missing template' thing from the ticket below as
well. Is it really that uncommon for a controller action to redirect
or explicitly render a different template? Is it still considered
'invalid'? Seems silly to have to create a bunch of blank templates.

https://rspec.lighthouseapp.com/projects/5645/tick...

I was also running into a conflict between the version of the rack gem
bundled with Rails 2.3.2 and the rack gem dependency from rspec-rails.
When running my app I was getting the error below from POST requests
that were expecting JSON back.

undefined method `split' for #<Mime::Type:0x7d429227>
     /Users/Shared/eds_test/share/RubyGems/1.8/gems/actionpack-2.3.2/
lib/action_controller/mime_type.rb:206:in `method_missing'
     /Users/Shared/eds_test/share/RubyGems/1.8/gems/rack-1.0.0/lib/
rack/request.rb:51:in `media_type'

I'm not sure why it was picking up the rack-1.0.0 gem. I thought I
checked out all the upgrade notes and I did re-run the rspec generator.

My solution was to remove the rack-1.0.0 gem and comment out the
runtime dependency in the rspec-rails gemspec.

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0')
then
       s.add_runtime_dependency(%q<rspec>, ["= 1.2.6"])
       #s.add_runtime_dependency(%q<rack>, [">= 0.4.0"])

Anyone have any better suggestions? Maybe I have something peculiar
that others aren't hitting these issues?

Thanks,
-lenny
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-06-06 05:48
(Received via mailing list)
On Fri, Jun 5, 2009 at 5:10 PM, Lenny Marks <lenny@aps.org> wrote:
> jruby-1.3.0
> rspec/rspec-rails 1.2.6
>
> I just ran into the 'Missing template' thing from the ticket below as well.
> Is it really that uncommon for a controller action to redirect or explicitly
> render a different template? Is it still considered 'invalid'? Seems silly
> to have to create a bunch of blank templates.
>
> 
https://rspec.lighthouseapp.com/projects/5645/tick...

I reopened the ticket.
This topic is locked and can not be replied to.