a guest May 17th, 2018 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ## spec_helper.rb
- config.global_fixtures = :users, :hubs, :pages, :layouts, :divs, :roles, :rolemaps, :event_categories
- module GlobalSpecHelper
- def get_user
- @user = users(:tesla)
- def do_login
- session[:user_id] = @user.id
- ## account_spec.rb
- module AccountSpecHelper
- include GlobalSpecHelper
- describe "Account#create_default_groups" do
- include AccountSpecHelper
- before(:each) do
- it "should ... whatever" do
- ## output when all specs are run (from TextMate... it's a little more verbose than the command line)
- create new groups
- You have a nil object when you didn't expect it!
- You might have expected an instance of ActiveRecord::Base.
- The error occurred while evaluating nil.
- trunk/spec/spec_helper.rb:41 :in `get_user'
- 39 module GlobalSpecHelper
- 40 def get_user
- 41 @user = users(:tesla)
- 42 end
- 44# gem install syntax to get syntax highlighting
RAW Paste Data