From 5e9fa37f11fc5262736f1e913342c93829d1688c Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 19 Jun 2012 11:32:49 +1000 Subject: [PATCH] Add failing spec for viewing distributors in sidebar --- spec/requests/consumer/distributors_spec.rb | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 spec/requests/consumer/distributors_spec.rb diff --git a/spec/requests/consumer/distributors_spec.rb b/spec/requests/consumer/distributors_spec.rb new file mode 100644 index 0000000000..d0038298a1 --- /dev/null +++ b/spec/requests/consumer/distributors_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +feature %q{ + As a consumer + I want to see a list of distributors + So that I can shop by a particular distributor +} do + include AuthenticationWorkflow + include WebHelper + + background do + # Given some distributors + 3.times { Spree::Distributor.make! } + end + + scenario "viewing list of distributors" do + # When I go to the home page + visit spree.root_path + + # Then I should see a list containing all distributors + Spree::Distributor.all.each do |distributor| + page.should have_selector 'a', :text => distributor.name + end + end + + scenario "browsing products by distributor" + +end