Quantcast
Channel: Ruby on Rails using Rspec feature test, get id of object you create while the tests - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Dennis Hackethal for Ruby on Rails using Rspec feature test, get id...

Assuming that test inserts a product record into your database, perhaps you can doproduct = Product.lastand only afterwards make the assertionexpect(page.current_path).to eq(product_path(product)) # or...

View Article



Ruby on Rails using Rspec feature test, get id of object you create while the...

I am pretty new to Ruby On Rails and am wondering what is the best practice to get an object id (in my case it is a product id) that was created during the test.I created a product in the feature test...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images