Skip to content

Instantly share code, notes, and snippets.

@suryart
Last active December 19, 2015 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suryart/5921218 to your computer and use it in GitHub Desktop.
Save suryart/5921218 to your computer and use it in GitHub Desktop.
orders spec example for spree frontend
require 'spec_helper'
describe 'Orders' do
let!(:product) { create(:product, :available_on => 1.day.ago) }
stub_authorization!
before(:each) do
visit spree.admin_path
click_link "Products"
sleep(5)
end
it 'should allow a user to see product name' do
puts Spree::Product.active.inspect
puts product.inspect
puts spree.product_path(product)
visit spree.product_path(product)
sleep(5)
expect(find('.product-title').text).to eq(product.name)
end
end
@miriamdeana
Copy link

getting error: `require': cannot load such file -- spree/core/url_helpers

Are you running this test from your app? I'm trying to use the spree helpers to write tests in my app. Can you show me what your spec_helper looks like?

@suryart
Copy link
Author

suryart commented May 12, 2014

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