Last active
December 19, 2015 07:49
-
-
Save suryart/5921218 to your computer and use it in GitHub Desktop.
orders spec example for spree frontend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: spec_helper should look like this: https://github.com/suryart/spree_active_sale/blob/master/spec/spec_helper.rb
You may have not added this line in your spec_helper.rb: https://github.com/suryart/spree_active_sale/blob/master/spec/spec_helper.rb#L26
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?