Re: [rspec-users] How to mock out a WEBrick::HTTPServer?

2012-01-15 Thread Evgeni Dzhelyov
I read your pastie and your Proxy class is tightly coupled with Webrick, you should decouple it and supply mocked object in the test environment. Some people use approach like this: class A def initialize(server = WEBrick::HTTPServer) end end And in test env initialize the A class like this:

Re: [rspec-users] before(:all) leaves records in database

2011-11-25 Thread Evgeni Dzhelyov
Yes, Only before :each is run in transaction. You should avoid creating records in the before :all hook ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] problems with javascript testing

2011-11-22 Thread Evgeni Dzhelyov
If your tests run in db transaction, you will not see the records when using javascript test adapter, like selenium. Refer to the capybara's README how to solve that, if this is the problem. ___ rspec-users mailing list rspec-users@rubyforge.org http://ru

Re: [rspec-users] assert_select - to do negative tests - need help with syntax please :)

2011-10-14 Thread Evgeni Dzhelyov
See this https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/assertions/selector.rb#L186 seems the syntax is "[name=...]" ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-use