[rspec-users] Rails Rspec Capybara Testing Javascript

2011-04-02 Thread apneadiving
I'm testing a Rails 3 app with Rspec and Capybara. For my integration tests, I need to test javascript. Of course, I watched http://railscasts.com/episodes/257-request-specs-and-capybara which presents the basics very well. Unfortunately an error is raised in the javascript as I can see using

[rspec-users] Rack application timed out during boot

2011-04-02 Thread apneadiving
Hi, I'm using Rspec + Capybara in Rails3. My integration tests went well today until I couldn't even access a page with simple requests such as: visit root_path With error: Rack application timed out during boot Any idea of what's going on?

[rspec-users] why is 'get :index, :page = 2' different from 'get :index, :page = 2'

2012-01-05 Thread apneadiving
Hi, After coding my app and enjoying a green wave of tests, I had horrible feedback about some bugs. Those bugs happened to some well tested parts of my app. After some research, I found out that get :index, :page = 2, :per_page = 5 is different from: get :index, :page = 2, :per_page = 5 So

[rspec-users] Testing an API I'm creating, need test server to be running

2012-01-14 Thread apneadiving
Hi, As I am writing a brand new API, I'd like to test it's response. Obviously, controller tests are great and work like a charm but as I expose data which are not really resources, I've to make some DIY to provide responses that ActiveResource can handle properly. Basically, it would be great

Re: [rspec-users] Testing an API I'm creating, need test server to be running

2012-01-17 Thread apneadiving
: On Jan 14, 2012, at 8:40 AM, apneadiving wrote: As I am writing a brand new API, I'd like to test it's response. snip/ Basically, it would be great in my case to test if ActiveResource gets the expected data but it means I have to launch a test server in background for the whole suite

[rspec-users] method calls count weirdness...

2012-01-27 Thread apneadiving
Hi, I see a really weird behavior there, the following test passes: it test, :focus do doc = Factory.build(:document) doc.should_receive(:update_project!).exactly(2).times doc.save end But when I do: def update_project! binding.pry #some stuff end I enter the method 3 times

[rspec-users] rails memoize and reload class = error raised

2012-02-03 Thread apneadiving
Hi, That's a bit off topic but since I use Spork + Rspec... Well, my classes are reloaded between each test wave so Rails' memoize method raises an error (which is expected, see code: http://rubydoc.info/docs/rails/3.0.0/ActiveSupport/Memoizable:memoize) Anyone resolved this issue with an

[rspec-users] testing around_save

2012-02-23 Thread apneadiving
I've just upgraded to Rails 3.2.1 and I can't get my specs checking whether or not around_save work anymore. I simply did something like: object.should_receive :around_filter_name object.save.should be_true (Actually, it was slightly more complex, it's part of a state machine)

Re: [rspec-users] testing around_save

2012-02-24 Thread apneadiving
document.status.should eq in_progress end end On Feb 24, 2:36 am, David Chelimsky dchelim...@gmail.com wrote: On Feb 23, 2012, at 3:36 PM, apneadiving wrote: I've just upgraded to Rails 3.2.1 and I can't get my specs checking whether or not around_save work anymore. What