On Wed, Jan 28, 2009 at 2:29 PM, Tom Hoen <li...@ruby-forum.com> wrote: > Josh - > > I used "git clone git://github.com/brynary/webrat.git". Should I have > used a different repo? > > First, I set up the host with my subdomain > > host! "rpems.test" > > Then the steps for the admin login: > > visit "/login" > fill_in("login", :with => "admin") > fill_in("password", :with => "test") > click_button("Log in") >
Try kicking things off with: visit login_url(:host =>" rpems.test") host! is a Rails method, and outside-of the knowledge of Webrat. Webrat only knows about the URLs and paths that you actually have it go through. I think this may produce the results you want because Webrat will be aware from the get-go that you're on as subdomain. This will probably still break in webrat HEAD, I am using this branch right now which includes a fix that is not in HEAD (it's waiting to be merged, or for another solution to take effect): http://github.com/zdennis/webrat/tree/make_current_url_fully_qualified This ensures that webrat respects subdomains while navigating through the app. You may want to check it out until one (or al) of the following tickets are closed: http://webrat.lighthouseapp.com/projects/10503/tickets/140-current_url-should-be-fully-qualified http://webrat.lighthouseapp.com/projects/10503/tickets/147-linkabsolute_href-is-broken http://webrat.lighthouseapp.com/projects/10503/tickets/146-click_button-does-not-expand-relative-action-urls With the aforementioned branch we haven't hit any new issues using subdomains in our app's feature suite. > Then i check what is returned, looking for the word "Classroom" to > indicate that the user is on the Classrooms page. > > So the steps should go > http://rpems.test/ > http://rpems.test/login > > Then the Log In submit, which, if the login is successful (which it > appears to be), redirects to > http://rpems.test/classrooms > > What else could I give you to help track down the issue (if I have > indeed installed the correct repo). > > Thanks > Tom > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users