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
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
#require File.expand_path("../factories", __FILE__) | |
#require File.join(Rails.root,'spec','factories','factories.rb') | |
require 'factory_girl_rails' | |
require 'capybara/rspec' | |
require 'capybara/rails' |
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 "FoodCategories" do | |
before :each do | |
establishment = Establishment.create(:name => 'Havmor') | |
@user = User.create(:email => 'user@example.com', :password => 'password', :establishment_id => establishment.id, :is_establishment_admin => true) | |
end | |
before do |