Have created sample sinatra cucumber app as suggested on wiki. Tried both env.rb configurations from there and aslaks git repo. With this combination of gems I get the following error doing basic cuc tests When I visit ''/foo'' # features/step_definitions/general.rb:1 PATH_INFO must start with / (Rack::Lint::LintError) /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:16:in `assert'' /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:178:in `check_env'' /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:39:in `_call'' /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:33:in `call'' /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/mock.rb:70:in `request'' /Library/Ruby/Gems/1.8/gems/sinatra-0.9.1/lib/sinatra/test.rb:41:in `make_request'' /Library/Ruby/Gems/1.8/gems/sinatra-0.9.1/lib/sinatra/test.rb:44:in `orig_get'' /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/sinatra.rb:26:in `__send__'' /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/sinatra.rb:26:in `get'' /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/core/session.rb:104:in `send'' /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/core/session.rb:104:in `request_page'' /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/core/session.rb:205:in `visit'' ./features/step_definitions/general.rb:3:in `When /^I visit (.*)$/'' features/basic.feature:17:in `When I visit ''/foo'''' Afraid I can''t expand on this as I can''t getting debugging working with cuc and sinatra. All best Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090304/7351c907/attachment.html>
For what it''s worth, here''s how I had to hack Webrat to get my Sinatra 0.9.1 app working properly: http://gist.github.com/73735. On Tue, Mar 3, 2009 at 11:39 PM, Andrew Premdas <apremdas at gmail.com> wrote:> Have created sample sinatra cucumber app as suggested on wiki. Tried both > env.rb configurations from there and aslaks git repo. With this combination > of gems I get the following error doing basic cuc tests > > When I visit ''/foo'' # > features/step_definitions/general.rb:1 > PATH_INFO must start with / (Rack::Lint::LintError) > /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:16:in > `assert'' > /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:178:in > `check_env'' > /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:39:in `_call'' > /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:33:in `call'' > /Library/Ruby/Gems/1.8/gems/rack-0.9.1/lib/rack/mock.rb:70:in > `request'' > /Library/Ruby/Gems/1.8/gems/sinatra-0.9.1/lib/sinatra/test.rb:41:in > `make_request'' > /Library/Ruby/Gems/1.8/gems/sinatra-0.9.1/lib/sinatra/test.rb:44:in > `orig_get'' > /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/sinatra.rb:26:in > `__send__'' > /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/sinatra.rb:26:in > `get'' > > /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/core/session.rb:104:in > `send'' > > /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/core/session.rb:104:in > `request_page'' > > /Library/Ruby/Gems/1.8/gems/webrat-0.4.2/lib/webrat/core/session.rb:205:in > `visit'' > ./features/step_definitions/general.rb:3:in `When /^I visit (.*)$/'' > features/basic.feature:17:in `When I visit ''/foo'''' > > > Afraid I can''t expand on this as I can''t getting debugging working with cuc > and sinatra. > > All best > > Andrew > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090304/a3c942d0/attachment.html>
My application (the one on which the wiki example is based) still runs just fine on 0.9.1, so I don''t think it''s related to the version change. I think the hacks Pat used are solely to do with getting selenium mode happy.
Rob, Is your Sinatra app using the "classic" style? If so, I think it would work without need for modification. If your app is a class that inherits from Sinatra::Base, you''re likely to see issues unless you take the steps in the Gist. Pat On Mar 4, 2009, at 4:43 AM, Rob Holland <rob.holland at gmail.com> wrote:> My application (the one on which the wiki example is based) still runs > just fine on 0.9.1, so I don''t think it''s related to the version > change. > > I think the hacks Pat used are solely to do with getting selenium > mode happy. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
The app runs fine, its the cucumber tests that don''t. If you can point me to your app I''ll give it go here. I''m using classic style (just started with Sinatra) 2009/3/4 Rob Holland <rob.holland at gmail.com>> My application (the one on which the wiki example is based) still runs > just fine on 0.9.1, so I don''t think it''s related to the version > change. > > I think the hacks Pat used are solely to do with getting selenium mode > happy. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090304/8ac13db2/attachment.html>
Apologies - false alarm - problem was with my step-definition all best Andrew 2009/3/4 Andrew Premdas <apremdas at gmail.com>> The app runs fine, its the cucumber tests that don''t. If you can point me > to your app I''ll give it go here. > > I''m using classic style (just started with Sinatra) > > 2009/3/4 Rob Holland <rob.holland at gmail.com> > > My application (the one on which the wiki example is based) still runs >> just fine on 0.9.1, so I don''t think it''s related to the version >> change. >> >> I think the hacks Pat used are solely to do with getting selenium mode >> happy. >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090304/02406ad0/attachment.html>