Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak in controller testing for json response #289

Closed
beornborn opened this issue Jul 15, 2013 · 1 comment
Closed

memory leak in controller testing for json response #289

beornborn opened this issue Jul 15, 2013 · 1 comment

Comments

@beornborn
Copy link

describe "GET anchor" do
  context 'timestamp is not a number' do
    it 'shows error' do
      get :anchor, {auth_token: 'qwerty', timestamp: 'string'}
      expect(response).to eq({success: false, anchor: nil, error: 'Timestamp should be a number'})
    end
  end
end

when I edit
expect(response).to eq({success: false, anchor: nil, error: 'Timestamp should be a number'})
to
expect(response.body).to eq({success: false, anchor: nil, error: 'Timestamp should be a number'}.to_json)
it works.

but rspec should show the fail, but not begin to eat memory

@alindeman
Copy link
Contributor

Yep, this is a bug in Rack. See rack/rack#419 and previous rspec issues #166 and rspec/rspec-rails#601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants