Re: [rspec-users] [rspec-rails] rspec-rails forcing test environment?

2009-08-10 Thread Balint Erdi
> > > Rails::Initializer.run do |config| > >  (...) > >  config.gem "rspec", :version => ">= 1.2.8", :lib => 'spec' > >  config.gem "rspec-rails", :version => ">= 1.2.7.1", :lib => 'spec/ > > Use lib => false to keep rails from automatically loading rspec and/or > rspec-rails > > This should als

[rspec-users] [rspec-rails] rspec-rails forcing test environment?

2009-07-31 Thread Balint Erdi
Hi, I realized that requiring rspec-rails somehow sets RAILS_ENV to 'test'. My experimental environment.rb file is the following: puts "XXX RAILS_ENV: #{RAILS_ENV}" Rails::Initializer.run do |config| (...) config.gem "rspec", :version => ">= 1.2.8", :lib => 'spec' config.gem "rspec-rails",

Re: [rspec-users] [cucumber] webrat+selenium integration problem: record n

2009-04-05 Thread Balint Erdi
Hi Mateusz, > > hi Ben > > I am newbie with cucumber and bdd. I was wondering if you can take a > look on my problems. > I have similar problem like Balint. I test my own and clearance features > with selenium and webrat. I don't have to say that with werbrat > everything is perfect. When I r

Re: [rspec-users] [cucumber] webrat+selenium integration problem: record n

2009-03-25 Thread Balint Erdi
Ben Mabey wrote: > > With that step definition you don't need to pollute all of your features > with the steps to login. As it turns out you can have the best of both > worlds. Meaning, if you want webrat to use the faster post method only > for non-selenium runs you can. Like so: > > Given

Re: [rspec-users] [cucumber] webrat+selenium integration problem: record n

2009-03-25 Thread Balint Erdi
> Hey Ben, thanks a lot. > > The problem I am experiencing now is that information stored in the > session does not seem to be retained between steps (again, only in the > case of selenium sessions, plain sesssion work fine). So the login > function works fine now but when I go to another page

Re: [rspec-users] [cucumber] webrat+selenium integration problem: record n

2009-03-25 Thread Balint Erdi
Ben Mabey wrote: > Couple things I'd like to point out. In your enhanced.rb you don't need > to do the Before hook yourself. You can just require > 'database_cleaner/cucumber'. I've updated your gist to use that. > In your plain.rb it seems like you are trying to truncate your database > just o

Re: [rspec-users] [cucumber] webrat+selenium integration problem: record n

2009-03-24 Thread Balint Erdi
serves me even better. It works! My current config is here: http://gist.github.com/83635. Once again, thank you for your help. @Mike: I may check that out, thank you! Balint Ben Mabey wrote: > Balint Erdi wrote: >> And I fill in "password" with "secret" >&g

[rspec-users] [cucumber] webrat+selenium integration problem: record not saved to database?

2009-03-23 Thread Balint Erdi
Hey, I am writing a simple cucumber feature for a Rails app to test if the webrat+selenium integration was successful: Scenario: Successful log in Given the user "pepito" exists # (1) And the user "pepito" is active When I go to the login page And I fill in "login" with "pepito"

Re: [rspec-users] [cucumber] accessing session variables

2009-03-14 Thread Balint Erdi
Oh, I see. I'll heed your advice and will consider using @user for the logged in user in the future. Thanks again, Balint Matt Wynne wrote: > On 14 Mar 2009, at 19:11, Balint Erdi wrote: > >> >> nice >> >> 3. using instance variables to pass state in the

Re: [rspec-users] [webrat] click link by title doesn't work

2009-03-14 Thread Balint Erdi
Andrew Premdas wrote: > > When /^I follow view (\w+) details link$/ do |object| > click_link "#{object}_details}" > end I think the problem is that you have an extra } in the title of the link you are looking for. It should just be: When /^I follow view (\w+) details link$/ do |object| cli

Re: [rspec-users] [cucumber] open source projects with cucumber features

2009-03-14 Thread Balint Erdi
Yes, I am writing a Rails app. Anyway, I have got over the initial "writer's block" thanks to a very insightful thread on this forum (http://www.mail-archive.com/rspec-users@rubyforge.org/msg06296.html) and your valuable help. Thank you all! Balint Matt Wynne wrote: > On 11 Mar 2009, at 19:46,

Re: [rspec-users] [cucumber] accessing session variables

2009-03-14 Thread Balint Erdi
akes step definitions too coupled. (I have not experienced this but read it in the thread and it seems logical) That said, I am still a starter with cucumber so I might come back and reassess my decisions :) Once again, thank you for your suggestions! Balint Matt Wynne wrote: >

[rspec-users] [cucumber] open source projects with cucumber features

2009-03-11 Thread Balint Erdi
Hi, I was looking for some "real-world" cucumber features (mainly on github) to see how more complex features are built but I have not really found any. Could you point me to some? Thank you, Balint -- Posted via http://www.ruby-forum.com/. ___ rspec-u

[rspec-users] [cucumber] accessing session variables

2009-03-11 Thread Balint Erdi
Hey, I have the following simple scenario and the step definitions: Scenario: Create album Given I am logged in as "pepito" When I go to my profile page ... Given /^the user (.*) exists$/ do |login_name| User.find_by_login(login_name) || Factory(:user_with_password, :login => login_name)