Make all spec work, switch to thoughtbot way of integration testing

This commit is contained in:
2013-04-10 17:06:47 +02:00
parent 7b71e677c9
commit 20fa6ac805
12 changed files with 175 additions and 220 deletions
@@ -0,0 +1,20 @@
require 'spec_helper'
feature 'Supplier product categories spec', %q{
In order to manage product categories
As a confirmed supplier
I want to have control over product categories and associated products
} do
background do
create_confirmed_supplier 'supplier@qwaiter.com'
end
context "GET #index" do
background do
@product_category = create :product_category, supplier: @supplier
end
scenario "I can see a drag handle having class .handle for sorting the product categories" do
login_supplier_as 'supplier@qwaiter.com'
visit '/supplier/product_categories'
page.should have_selector '.handle'
end
end
end