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

Already on GitHub? Sign in to your account

Problems with request spec in Capybara #16

Closed
kirs opened this Issue Mar 28, 2013 · 2 comments

Comments

Projects
None yet
2 participants

kirs commented Mar 28, 2013

My spec:

it 'should sync request_store' do
  RequestStore.store[:myvar] = "hello"
  visit my_path
end

controller, visited by my_path

raise RequestStore.store[:myvar].inspect

raised value is nil.

Any ideas?

Contributor

timoschilling commented Mar 28, 2013

Your test and you're request runs not in the same Thread!

You need to mock RequestStore.store

On 28.03.2013, at 19:48, Kir Shatrov notifications@github.com wrote:

My spec:

it 'should sync request_store' do
RequestStore.store[:myvar] = "hello"
visit my_path
end
controller, visited by my_path

raise RequestStore.store[:myvar].inspect
raised value is nil.

Any ideas?


Reply to this email directly or view it on GitHub.

kirs commented Mar 28, 2013

Thanks!

@kirs kirs closed this Mar 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment